Indirection
Indirection is a technique in which access to a target occurs through an intermediate reference, abstraction, or layer rather than directly.
Unit Testing Principles, Practices, and Patterns
An intermediate abstraction layer that separates a caller from the concrete implementation or solution it ultimately needs.
- How it is used
- Separates domain logic, application coordination, and infrastructure while supporting clearer unit and integration testing boundaries.
- How deep it goes
- Contrasts useful boundaries with excessive layers and demonstrates callback removal, stopping short of implementation-level mechanics.
- Examples
- Uses checkout and report services, callback refactoring, and a three-layer backend architecture.
- What you can do after
- Evaluate and simplify abstractions by preserving useful boundaries, reducing layer count, and replacing circular callbacks with returned values.
Read how Unit Testing Principles, Practices, and Patterns explains indirection →
Build High Value Software Systems
An additional layer of reference or mediation through which software accesses an object, operation, or dependency.
- How it is used
- Identifies added structure as waste when it exceeds current needs, including unrequested abstractions in generated code.
- How deep it goes
- Contrasts simple and overprocessed code, explains costs, and offers diagnostic questions without developing implementation internals.
- Examples
- Shows an order service with unrequested features and configurable username validation where a direct rule suffices.
- What you can do after
- Evaluate whether added structure addresses observed variability or imposes costs without solving a current problem.
Read how Build High Value Software Systems explains indirection →
Also covered in
- Data-Oriented Programming in JavaIn early access (MEAP)
- Go by Example
- Grokking Web Application Security
What to know first
- controllerA controller is a software component that receives input or requests and coordinates other components or operations to produce a response or change application state.
- data structureA data structure is an organized representation of data and its relationships that supports defined operations for storing, accessing, or modifying it.
Related concepts
- abstractionimplements · Abstraction is a simplified representation that preserves relevant properties or behavior while omitting details unnecessary at a given level or for a given purpose.
- search indexuses · A search index is a data structure that organizes searchable representations of content to support efficient retrieval in response to queries.
- natural language interfaceused by · A natural language interface enables interaction with a system through human-language text or speech.
- databaseuses · A database is an organized persistent data store, typically managed by software, that supports storing, retrieving, and modifying data.
- module injectionused by · Module injection is a dependency-injection technique in which a module receives or imports replaceable collaborators through its module boundary.
- refused by · A Clojure ref is a reference type whose state is coordinated by software transactional memory and can be changed only within a transaction.
Questions about indirection
What is indirection?
Indirection is a technique in which access to a target occurs through an intermediate reference, abstraction, or layer rather than directly.
Which Manning books explain indirection?
Unit Testing Principles, Practices, and Patterns and Build High Value Software Systems.
What should I know before learning indirection?
Manning books that teach indirection usually introduce controller, data structure and file type first.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

