Domain-Driven Design
Domain-Driven Design: Aggregates & Invariants
What aggregates are, how to draw their boundaries, and why external code should only talk to the root.
An Aggregate is a cluster of domain objects treated as a single unit for data changes. Every aggregate has a root entity — the only object external code may hold a reference to. All modifications go through the root, which enforces invariants across the cluster. This is the primary mechanism for maintaining consistency without distributed transactions.
Continue reading
- →
Dependency Injection and IoC Containers
Invert control of dependency creation to keep classes decoupled from their collaborators and trivially testable.
- →
The Observer Pattern and Event-Driven Design
Decouple publishers from subscribers by letting objects register interest in events without the producer knowing who is listening.
- →
The Strategy Pattern: Encapsulating Algorithms
Define a family of algorithms, encapsulate each one, and make them interchangeable — open for extension, closed for modification.