In this lesson you'll learn
- A precise definition of DDD and the three premises it rests on
- What a domain model is, and why it lives in conversations and code
- The role of ubiquitous language as the heart of the practice
- What DDD is not — clearing up the most common misconceptions
Eric Evans introduced the term in his 2003 book Domain-Driven Design: Tackling Complexity in the Heart of Software. Two decades and many practitioners later — Vaughn Vernon, Vlad Khononov, Alberto Brandolini — the core idea has only sharpened: software for a complex business should be organized around a deep, shared model of that business.
A working definition
Strip away the jargon and DDD rests on three premises:
- For most software projects, the primary focus should be on the domain and its logic — not the database, the framework, or the UI.
- Complex designs should be based on a model of that domain.
- That model is best built through ongoing collaboration between domain experts and software people, expressed in a shared language.
Notice what's missing: no mention of microservices, event sourcing, or any specific tool. Those are options you may reach for later. DDD itself is the discipline of building and protecting a useful model.
The model is the project
A model is a selective simplification. A subway map is a model of a transit system: it deletes geography, scale, and street layout because none of that helps you ride the train. A useful domain model does the same — it keeps the concepts and rules that matter for the task at hand and discards everything else.
Crucially, in DDD the model is not a diagram you draw once and file away. It lives in three places at once, and they must stay in sync:
Ubiquitous language: the beating heart
The single most important practice in DDD is the ubiquitous language — one rigorous, shared vocabulary used by developers and domain experts alike, in meetings, in documents, and directly in the code. If experts say "a customer places an order," the code has a placeOrder() method, not insertOrderRecord().
This sounds trivial and is profoundly not. When language and code diverge, every conversation needs a mental translation step, and translation is where bugs and misunderstandings breed. A faithful ubiquitous language removes that translation entirely.
PlaceOrder — code that speaks the expert's language
// Reads the way a domain expert would describe it.
public final class Cart {
public Order placeOrder(CustomerId customer, ShippingAddress address) {
if (lines.isEmpty()) {
throw new EmptyCartException(); // "you can't place an empty order"
}
return Order.from(this, customer, address);
}
}What DDD is not
Because the term gets stretched, it helps to state the boundaries plainly.
| People think DDD is… | It actually is… |
|---|---|
| A set of code patterns (entities, repositories…) | Those are the tactical tools; the strategic, collaborative half matters more |
| The same thing as microservices | An approach to modeling; it works just as well in a single monolith |
| A specific framework or library | Tool-agnostic; jMolecules and Axon merely make the patterns easier in Java |
| Always worth doing | Worth doing where the domain is complex enough to repay the effort |
Key takeaways
- DDD centers software on a shared model of the business domain, built through expert collaboration.
- A model is a purposeful simplification; in DDD it lives in experts' minds, in shared language, and in the code at once.
- The ubiquitous language is the heart of DDD — the same words used in conversation, docs, and code.
- DDD is not a framework or a synonym for microservices, and it is not always the right call.