Domain-Driven Design
Aggregates, domain events, and the tactical patterns behind a well-modeled domain.
📖 Key terms & concepts — definitions for the jargon used across these posts.
-
Domain-Driven Design 101: Bounded Contexts and Aggregates — Modeling the Business, Not the Tables
-
Ubiquitous Language & Event Storming: Why SetShippedStatus, Not UpdateStatus(5)
-
Entities vs Value Objects: Why Address Has No Id While Order Does
-
Aggregates & Aggregate Roots: Why You Can't Call orderItems.Add() Directly
-
Domain Events: Why a Failed Handler Rolls Back the Order Status Change Too
-
Domain Services vs Application Services: Who Decides the Grace Period Expired?
-
Repositories: Why You Can't Fetch OrderItems Without Their Order
-
Factories: Why Order Has Both a Constructor and NewDraft()
-
Specification Pattern: Why AndSpecification Evaluates Both Sides Unconditionally
-
Why does Catalog.API define its own, smaller copy of Ordering's event class?
-
How does replaying a thousand past events reconstruct an aggregate's current field values?
-
CatalogItem has a RemoveStock() method with a guard clause — so why can stock still go negative?
-
A command can pass every validation rule and still violate a business invariant — why are these separate checks?
-
Domain-Driven Design Key Terms: Bounded Context, Aggregate, and the Modeling Vocabulary Behind Every Post