1 of 6
Domain-Driven Design
Domain-Driven Design: Strategic Patterns
Bounded contexts, ubiquitous language, and context maps — the high-level tools for taming large domains.
Strategic DDD is about dividing a large domain into Bounded Contexts — explicit boundaries within which a model applies consistently. Each context has its own Ubiquitous Language shared between developers and domain experts. A Context Map documents how contexts relate: Shared Kernel, Customer-Supplier, Conformist, Anti-Corruption Layer, or Open Host Service.
OrderContext:
upstream: InventoryContext # Inventory is upstream supplier
downstream: ShippingContext # Shipping conforms to Order
relationship: Customer-Supplier
PaymentContext:
relationship: Shared-Kernel # shared Money value objectContinue 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.