Information Hiding
The boundary follows likely reasons for change and protects internal representation.
- DecisionMay change internally.
- ContractExposes capabilities.
- CallerUses only the contract.
Context
Why this is important
Hide changeable design decisions behind a narrow module contract.
A design principle for business and technical module boundaries.
Contract and internal decision
The example shop remains a modular monolith with seven modules and a shared deployment.
This is how you read the picture
- Decision Encapsulation
- Contract Interface
- Caller Dependency
| Aspect | Visibility | Change location |
|---|---|---|
| Interface | Business operation | Contract stays stable |
| Implementation | Internal structure | Module can change it |
Benefits & limitations
Helps if:
- The decision concerns an internal representation likely to change.
- Several callers need the same business capability, not the same storage access.
Boundaries
- An interface hides a decision only when it does not pass internal details through.
- Too many small boundaries add coordination overhead and make change harder.
In practice
- List the module’s decisions and mark those that may change for business or technical reasons.
- Design the smallest contract through which other modules can use a capability; compare it with the callers’ actual needs.
- Change an internal representation experimentally and trace which callers need updates. Refine the boundary where unnecessary dependencies become visible.
Read the detailed explanation
Information Hiding comes from Parnas’s module criteria: decompose a system around difficult or likely-to-change design decisions. An interface describes the capability callers need; internal data structures and processes stay inside the module. An implementation can then change while its contract and observable behaviour remain stable.
A table change stays within the Ordering module. Module Boundaries frames ownership; Dependency Inversion explains stable contract direction.
Check your understanding
Test yourself in three stages
ReadingCheck in the picture
Which side of the boundary contains the changeable table structure?
View the solution with justification
The internal implementation of the Ordering module.
ApplyingTransferred to a new situation
How can Payment request an order confirmation?
View the solution with justification
Through a business operation of the Ordering module rather than its tables.
EvaluateWeighing an alternative
How can you tell that a contract leaks internal decisions?
View the solution with justification
Callers must know storage fields or internal processes to use the capability.
Explore further
These building blocks continue the thoughts of this page.
References
- Parnas · On the Criteria to Be Used in Decomposing Systems into Modules (opens in new tab)Primary source on module criteria and hidden design decisions.
- Parnas · Designing Software for Ease of Extension and Contraction (opens in new tab)Primary source on changing modular designs.
- Leavens & Müller · Information Hiding and Visibility in Interface Specifications (opens in new tab)Primary source on hidden implementations and visible contract specifications.