Library
Domain-Driven Design Distilled
AI Software Development

Domain-Driven Design Distilled

Vaughn Vernon 2016 10 references

Apply Domain-Driven Design patterns for strategic design (Bounded Contexts, Ubiquitous Language, Subdomains, Context Mapping) and tactical design (Aggregates, Domain Events) when architecting or reviewing software systems.

domain-driven-design bounded-contexts aggregates ubiquitous-language event-sourcing software-architecture

Overview

The Core Framework

  • Design is inevitable — choose intentional design (DDD) over accidental design (Big Ball of Mud)
  • Strategic design (boundaries, language, integration) must precede tactical design (Aggregates, Domain Events)
  • A Bounded Context is a semantic boundary; the Ubiquitous Language within it IS the design artifact
  • Default to eventual consistency between Aggregates; immediate consistency is the exception
  • Knowledge acquisition through Domain Expert collaboration is the engine, not documentation or process

Quick Lookup

Situation Do This Avoid This
Starting a new system Identify Core Domain and Bounded Contexts first Jumping to database schema or Aggregate design
Multiple meanings for same term Create separate Bounded Contexts Forcing one abstract model to cover all meanings
Integrating with legacy/external Use Anticorruption Layer + messaging Importing their types or synchronous RPC chains
Designing data consistency Ask Domain Experts about time tolerances Defaulting to immediate consistency everywhere
Modeling domain objects Embed business logic in domain objects Getters/setters only (Anemic Domain Model)
Discovering domain structure Run Event Storming: Events → Commands → Aggregates Starting from database tables or API endpoints
Sizing Aggregates Start small (one Entity); grow only for invariants Large Aggregates "for convenience"
Cross-Aggregate updates Publish Domain Events for eventual consistency Modifying multiple Aggregates in one transaction

The Key Insight

"You really cannot apply tactical design in an effective way unless you begin with strategic design." — Vaughn Vernon, Chapter 1

References