Object-Oriented Design — Professional¶
Smalltalk’s message-passing model, Java’s nominal interfaces and virtual dispatch, and actor systems such as Akka embody different object boundaries and failure assumptions. Domain-driven design adds bounded contexts because one universal model becomes politically and semantically coupled.
At scale, shared domain libraries and inheritance frameworks become coordination bottlenecks. Track change propagation, dependency cycles, unstable interfaces, ownership concentration, and defect hotspots. Favor contracts and context boundaries over enterprise-wide class hierarchies.
Design and operations checklist¶
- Name invariants and responsible owners.
- Keep strong connascence inside a boundary.
- Validate substitution with behavioral contracts.
- Make concurrency and lifecycle explicit.
- Evolve public object APIs compatibly.
- Measure change cost before introducing frameworks.
DOMAIN RULE -> RESPONSIBILITY -> COHESIVE OBJECT -> MESSAGE -> COLLABORATOR
invariants + ownership + substitutable contracts
Test yourself¶
- How would you split a shared enterprise domain model?
- Which contract tests prove substitutability?
- When does an actor boundary improve object safety?
- How do you measure whether an OO framework reduces change cost?
Further reading¶
- Rebecca Wirfs-Brock, Object Design.
- Eric Evans, Domain-Driven Design.
- Sandi Metz, Practical Object-Oriented Design.
- Gamma et al., Design Patterns.