Abstraction & Encapsulation
Hiding mechanism behind contract, and protecting invariants by owning state.
3 to work through
-
advanced
A metadata-driven API layer generates queries over a customer's database. A customer writes a deeply nested query that produces a catastrophic join. Is that an abstraction failure, and what should the design do about it?
2 min answer -
advanced
A team proposes wrapping every cloud provider SDK behind an internal abstraction so the company could migrate providers later. Evaluate the proposal.
2 min answer -
advanced
Design the abstraction boundary for a "vote" on a large discussion platform where a handful of threads receive an enormous share of all votes. What should the interface promise, what must it hide, and what must it refuse to hide?
2 min answer
3 terms in this topic
Abstraction and Encapsulation
Hiding mechanism behind a contract so the mechanism can be replaced — and the discipline of not letting the mechanism leak through the contract.
conceptCost-Bearing Abstraction
The principle that any abstraction which lets a caller express arbitrary intent over a shared finite resource must also expose a budget - otherwise t…
conceptLeaky Abstraction
An abstraction whose underlying implementation details become visible or consequential, requiring users to understand what it was meant to hide.
Neighbouring topics
Architecture Fundamentals
General material on what solution architecture is and what an architect is accountable for.
Requirements to Constraints
Turning stated requirements into the constraints that actually bound a design.
Functional vs Non-Functional
Behaviour versus quality of behaviour, and why only the second constrains structure.
Architectural Drivers
The small subset of requirements whose change would force the structure to change.
Quality Attributes
Availability, latency, throughput, security, cost — expressed as testable scenarios.
Architecture Principles
Durable agreed rules that rule options out, stated with rationale and implications.
Coupling
How much one component must know about, or change alongside, another.
Cohesion
Whether the things inside a boundary belong together and change for the same reason.
Modularity
Composing a system from parts that can be understood and replaced independently.
Separation of Concerns
Organising so that a change to one concern touches one place.
Architecture Styles
System-level organising shapes, and how they differ from problem-level patterns.
Evolutionary Architecture
Designing for guided incremental change rather than for correctness on day one.
Fitness Functions
Automated checks that an architectural characteristic still holds.
Architecture Documentation
What to write down, at what altitude, and what nobody will ever read.
Conway's Law
Systems mirroring the communication structure of the organisation that builds them.
Trade-off Fundamentals
Why every architecture is a set of purchases, and how to state what you gave up.
Technical Constraints
Existing estate, skills, licences and platforms as inputs rather than obstacles.
Architecture Roles
Solution, enterprise, domain and platform architecture, and where each is accountable.
Reference Models
Shared conceptual frames — layering, tiers, viewpoints — and their limits.