DDD starts with understanding the business domain — commerce, insurance, logistics — and building its model together with domain experts; only then is the code designed around that model. Eric Evans coined the term in his 2003 book of the same name.
Strategic design
A large system is split into bounded contexts: each has its own model, its own vocabulary and its own boundaries. The model lives not in paper diagrams but in the code itself and evolves together with the system. For example, in an online shop “product” means different things for the catalogue, the warehouse and delivery — different concepts with different fields. Contexts are connected by explicit translation rules between the models.
Tactical design
| Element | Meaning |
|---|---|
| Entity | an object with identity: a customer, an order — two orders with the same total are still different |
| Value object | a characteristic without identity: the money value “100 sum”, an address |
| Aggregate | a group of objects with a single root; only the root is exposed to the outside, and changes go through it |
| Repository | code that stores and retrieves aggregates, hiding the storage |
| Domain event | a fact that has happened: “order paid”; other parts of the system react to it |
| Ubiquitous language | the experts’ terms match the names of classes and methods — the code reads like the requirements |
When to use it
- Worth it for complex domains with rich rules, where the model pays off.
- Overkill for simple CRUD systems: reference lists and forms need no aggregates or bounded contexts.
- Often combined with clean or hexagonal architecture and CQRS to separate writes from reads.
Sources
the term is written from these pagesVerified 8 Nov