What Is Domain-Driven Design?
What Domain-Driven Design is, which problems it solves, and why it starts with language and boundaries rather than classes. Ubiquitous Language, Bounded Context, strategic design, and the building blocks of the model.
In this chapter
Before any definitions, here is a concrete situation where DDD helps. A sample online store, launched by its team three years ago, started with three order states (new, paid, shipped), one customer type, and one payment method. The domain model was trivial. The Doctrine entity Order had six columns, OrderService had two hundred lines, and the controller had three methods. The team had three people and shipped each new feature within a week.
Three years into production, the domain looks different. There are twelve order states: new, awaiting_payment, paid, partially_paid, held_for_review, confirmed, shipped, delivered, cancelled, refunded, disputed, returned. There are four customer types: B2C, B2B with invoicing, dealer with a trade discount, and partner with a custom price list. Payment methods number five: card via Stripe, Apple Pay, bank transfer, cash on delivery, and an invoice due in 30 days. Each customer type has its own discount rules, its own VAT handling, and its own refund process.
The team now has five people, the code has 80,000 lines, and adding a new payment method (Bitcoin via BitPay) takes three weeks. The BitPay integration itself is not hard; it is done in a day. The three weeks go to the fact that every change in OrderService breaks something else. Add a Bitcoin branch to processPayment, and the refund logic in cancelOrder breaks. Fix the refund, and reporting in MonthlyRevenueService breaks. After three weeks of debugging and regression testing, BitPay is in production, but the backlog now holds two months of technical debt.
A senior developer noticed that the code reflects something other than what the product manager describes. The PM talks about a “binding order once the customer clicks Pay” and a “reservation that expires after 24 hours.” The code has Order::status = 'awaiting_payment', and the TTL check hides in a weekly cron job nobody looks at. When a tester reports a bug in the reservation logic, a developer has to piece the behavior together from four places: OrderService::checkExpiration, WeeklyCleanupCommand, OrderEventSubscriber, and OrderRepository::findExpiredAwaitingPayment. None of those places speaks the PM's language.
A new hire needs two months before sending a first meaningful PR, even though Symfony takes them a week to pick up. What slows them down are the domain rules: they live in the heads of two seniors, and the code holds only their consequences. A junior asks, “Why don't we count shipping in a refund, but we do in a dispute?” The answer is, “Because the accountant wanted it that way once.” None of it is documented.
The CEO asks the CTO why adding a payment method takes three weeks when competitors manage it in one. The CTO knows the problem is not the tooling but the way the domain is modeled. The code does not reflect how the business actually makes decisions. For every feature, the team has to rediscover what lives where, which rule applies in which state, and who has the authority to approve a refund.
The complexity of the domain has outgrown the model. This is exactly the situation DDD addresses. It offers a concrete answer: instead of OrderService::cancelOrder($order, $reason), a domain model Order with explicit methods confirm(), cancel(), dispute(), and refund(). Instead of a text status, a state machine with explicit transitions. Instead of one Customer for the whole company, separate Bounded Contexts (ordering, billing, support), each with its own Customer, its own attributes, and its own rules. Instead of months of regressions, aggregate boundaries that keep refactoring within reasonable limits.
The main benefit of DDD: the code reflects the language domain experts speak. When the product manager says, “This isn't a warranty claim, it's a dispute with a different process,” the code can say the same thing. When the accountant decides whether a refund includes shipping, the domain class Refund has an excludeShipping() or includeShipping() method that states it. When a tester writes a scenario, they use the same vocabulary as the PM. Inside a context there is one vocabulary. It lives in the team's heads and in the code, and when it changes, it changes in both places at once.
DDD has a price: higher upfront complexity, learning for the whole team, and ongoing collaboration with domain experts. For a CRUD application over a single table, it does not pay off. There, an OrderService with a setter is the right choice, and investing in an aggregate would be out of proportion. For a complex domain with growing rule complexity that a team maintains for years, the investment pays back. That takes time, though, and there is no reliable estimate of how long.
This book shows how to decide whether DDD pays off in your project (the cases where the answer is “no” are covered in When Not to Use DDD). From there it moves through domain modeling, finding aggregates, and separating writes from reads, all with working Symfony 8 code you can adopt.
01.01 Defining DDD#
Eric Evans builds DDD on the premise that the main risk in complex software is not technology but a poor understanding of the problem domain. His answer is to move domain modeling to the center of the entire design. He worked this out systematically in his 2003 book Domain-Driven Design: Tackling Complexity in the Heart of Software [1].
His own concise definition of DDD came twelve years later, at the start of the freely available DDD Reference [2]. He sums it up in three points, in this order:
The book uses the terms from these three points in Evans's original sense. A domain is a sphere of knowledge, influence, or activity that the software addresses. A model is a system of abstractions that describes selected aspects of a domain. Ubiquitous Language is a language structured around the domain model and used by all team members, but within a single Bounded Context, not across the whole company. A Bounded Context describes a boundary, typically a subsystem or the scope of one team's work, within which a particular model applies.
The link between language and boundary is the first thing to drop out of the definition. Martin Fowler puts it from the other side: once the language changes, you need a different model [3]. An attempt at one company-wide vocabulary for every department therefore ends either with compromise names nobody actually uses or with a frozen glossary. The subsection on Bounded Context shows what this conflict looks like in practice.
01.02 History and evolution of DDD#
The main milestones in the evolution of DDD [4]:
- 2003 – Eric Evans publishes Domain-Driven Design: Tackling Complexity in the Heart of Software, which introduces the core concepts: Ubiquitous Language, Bounded Context, Aggregate, and strategic design.
- 2009 – At QCon London, Evans summarizes what he would write differently five years on [5]. He calls the building blocks overemphasized: entities, value objects, factories, and repositories alike [6]. At the center he places Ubiquitous Language, Context Mapping, and the Core Domain.
- 2013 – Vaughn Vernon publishes Implementing Domain-Driven Design, which brings practical examples and promotes patterns such as Aggregate design, Domain Events, and CQRS in the context of DDD.
- 2013 – Alberto Brandolini introduces Event Storming, a workshop technique for collaborative domain modeling with domain experts.
- 2015 – Evans publishes the Domain-Driven Design Reference under a CC-BY license: a free summary of all the patterns. Bounded Context comes first in its pattern language, while in the 2003 book it did not appear until chapter fourteen.
- 2016 – Vernon publishes Domain-Driven Design Distilled. The order of presentation is reversed: Bounded Contexts, subdomains, and Context Mapping come first, and only then aggregates and domain events. The same year, the first DDD Europe conference takes place in Brussels.
- After 2015 – The microservices wave turns Bounded Context into the most frequently cited guide for drawing service boundaries [7]. In 2019, however, Evans himself called the equation “microservice = Bounded Context” a simplification and distinguished several different situations [8].
- 2021 – Vlad Khononov publishes Learning Domain-Driven Design, subtitled Aligning Software Architecture and Business Strategy. The center of gravity shifts from code to business strategy.
01.03 Ubiquitous Language in practice#
Ubiquitous Language does not come from writing a document. It comes from conversation: at a planning meeting, during Event Storming, in a discussion over a bug where the domain expert corrects a developer, “That's not a cancellation, the reservation expired” [9]. The document is only a record of that conversation. A team that starts with the document ends up with a vocabulary nobody speaks.
Evans adds a rule that tends to get overlooked in practice: a change in the language is a change in the model. The link works in both directions. A new term from an expert forces a change in the code. And when modeling reveals that two states are really three, that new distinction goes back into the conversation with the expert, not only into an enum.
The most practical form of that record is a Markdown glossary in the repository next to the code, not a wiki page or a shared cloud document. The reason is operational. A glossary in the repository goes through code review, has a git history, and a term change can be tied to the commit that renames the classes. The whole team maintains it: whoever introduces or changes a term in the code also opens a PR against the glossary. The domain expert reviews the meaning; writing and upkeep stay with the developers.
The experts' language in conversation, English in code
Teams whose domain experts do not work in English face a question Evans did not address. The experts speak their own language, while identifiers in code are conventionally English. This book comes from a Czech setting, so its examples use Czech, but the same holds for any language. A reasonable default: the experts' language in conversation and in the glossary, English in code identifiers. The glossary then doubles as a translation table. Every domain term has a binding English equivalent, and the team decides the translation, not an individual developer at the keyboard. Without such a table, a single concept such as reservation expiry ends up with three translations, in classes named expire, lapse, and timeout.
A term in the experts' language belongs directly in an identifier when the domain is purely local and English has no established term for it. Czech DPH is not the same thing as VAT in another jurisdiction. The Czech datová schránka, a government-run electronic mailbox for official correspondence, has no English equivalent at all, and translating it as DataBox obscures the meaning more than it clarifies. A class named DatovaSchranka or DphSazba is more precise in such code than a made-up English name. The team sets the boundary in the glossary: terms marked as untranslatable keep their original names.
The logic is the same as with translation between contexts: inside a boundary one vocabulary applies, and translation happens only at the boundary. The glossary translates between conversation and code; Published Language does the same between two Bounded Contexts.
Signs of language erosion
Language erodes quietly. Three signals give it away before any production incident does:
- The PM talks about a “reservation that expires after 24 hours,” and the code has
Order::status = 'awaiting_payment'plus a cron job. Same concept, two vocabularies: exactly the situation from the opening of this chapter. - People translate in meetings. Once a developer silently converts the expert's sentence (“what she means is our
PendingOrder”), the model and the domain have already drifted apart. - A new colleague asks what a glossary term means and hears, “We don't use that anymore.” A dead glossary is worse than none, because it documents a language that does not exist.
The answer to erosion is always the same: bring the code back in line with the experts' language. That direction applies to erosion, not in general. During modeling, a new term is often born in the model and only then enters the experts' vocabulary. Renaming a class is cheap. A team that spends a year speaking a different language from the code it writes pays for translation in every conversation.
Sample glossary
1# Glossary – Ordering context2 3| Domain term (Czech) | Code identifier | Meaning | Notes |4|---|---|---|---|5| objednávka (order) | `Order` | The customer's commitment after clicking “Pay.” | |6| rezervace (reservation) | `Reservation` | Goods held before payment; expires after 24 h. | Not an order! |7| propadnutí rezervace (reservation expiry) | `Reservation::expire()` | Automatic release of the hold after the TTL. | Not a cancellation (“storno”). |8| storno (cancellation) | `Order::cancel()` | Active cancellation by the customer or an operator. | |9| spor (dispute) | `Dispute` | A contested payment handled with the payment gateway. | Different process from a warranty claim (“reklamace”). |10| DPH (Czech VAT) | `Dph`, `DphSazba` | Czech tax rate, including the reverse charge. | Untranslatable: keep the Czech name, do not rename to VAT. |11 12Changes: every term change = a PR linking to the commit13that renames the corresponding classes. Reviewer: domain expert.
The glossary does not aim to be complete. It captures the terms that are easy to confuse: pairs like reservation/order or cancellation/expiry, where a wrong translation means wrong system behavior.
01.04 Strategic design#
Strategic design decides how to split a system into independent parts and how those parts communicate.
The order of sections in this chapter is deliberate. In 2009, Evans called the tactical building blocks overemphasized [6] and put language, context mapping, and the Core Domain at the center [5]. Seven years later, Vernon reversed the order of presentation in his book. Fowler considers the strategic part Evans's main contribution: nobody before him had convincingly solved the problem of dividing a large domain into interconnected Bounded Contexts [10]. A team that takes only entities and aggregates away from DDD ends up with an object-oriented design that uses a domain vocabulary. Chapters 2 through 5 cover the strategic part.
The main concepts:
- Core Domain – The part of the domain that lets the company beat its competitors. Evans lists it as the first point of his DDD definition, and modeling effort belongs here above all. How to tell it apart from supporting and generic parts is covered in the chapter on subdomains.
- Bounded Context – An explicitly delimited area within which a single domain model applies. The full definition with an example follows in the subsection below.
- Context Map – A map of the relationships between contexts. It shows who supplies a model to whom, who conforms to whom, and where translation happens.
The map has eight relationship types. Partnership means two teams that succeed or fail together and coordinate their releases. Shared Kernel is a shared piece of the model that both sides are responsible for; every change to the shared code needs the agreement of both. Customer/Supplier obliges the supplier to put the customer's requirements into its plan, whereas with Conformist the downstream side adopts the other model as it is. An Anti-Corruption Layer translates the foreign model and thereby protects your own language. An Open Host Service, by contrast, offers a single protocol to all consumers, and Published Language adds a shared data format to it. The eighth relationship, Separate Ways, is the decision not to integrate at all. It is the right choice more often than teams dare to admit. A ninth, unwanted state is the Big Ball of Mud: an area with no recognizable boundaries, which Evans added only in the DDD Reference. It pays to acknowledge it on the map and, above all, to keep its model from leaking out. All relationships, with decision criteria, are covered in the chapter on Context Mapping.
Bounded Context: where a model applies
No model applies everywhere. Each one simplifies the domain for a particular purpose and stops working outside it. A Bounded Context is an explicit boundary within which one model and one Ubiquitous Language apply in full. Inside the boundary, every term has exactly one meaning. Whatever lies beyond it, the model deliberately ignores.
The same term denotes a different model in different contexts. An online store has a Customer in the Ordering context and in the Support context, but they are two different objects. Ordering cares about the delivery address, payment methods, credit limit, and order history; its invariants revolve around payment. Support sees a contact with a communication history, an SLA priority, and open tickets; payment data is of no interest to it, and it should have no access to that data. The only thing they share is the customer's identity, usually an ID through which the two models connect.
Merging both views into a single Customer class ends the familiar way: an object with thirty attributes, of which each use case needs five, and with rules that get in each other's way. One change made for support breaks ordering. Separate models in separate contexts remove the conflict. Each is small, complete, and internally consistent.
The boundary is not purely semantic, either. Evans prescribes it in three dimensions at once: in team organization, in which parts of the application the model covers, and in physical artifacts, meaning codebases and database schemas. A context that shares tables with another context has no boundary, however it is drawn in the documentation. The team dimension is developed in the chapter Conway's Law and Team Topologies, the physical one in DDD and Microservices.
A Bounded Context is also not the same thing as a subdomain. A subdomain is a part of the problem; a Bounded Context is a decision about the solution. In a newly designed system the two usually coincide, in a legacy one almost never. The difference is covered in the chapter on subdomains.
An explicit boundary means explicit translation. When Ordering needs data from the Support context (or the other way around), communication goes through a defined interface and terms are translated at the boundary, for example through the Anti-Corruption Layer mentioned above. That translation is not extra overhead. It exposes work that would otherwise happen implicitly, and with errors, inside a shared model.
A Bounded Context is therefore also a language boundary. In the Ordering context, “reservation” can mean holding goods; in the Logistics context, a delivery time window. Both meanings are correct, each in its own context. Implementing Bounded Contexts is covered in the chapter on basic concepts, and the relationships between contexts in the chapter on Context Mapping.
01.05 Tactical design#
Tactical design deals with implementing the domain model inside a single Bounded Context. There are seven building blocks, and this chapter only names them. Definitions, code, and edge cases belong to the chapter on basic concepts.
- Entity – an object with an identity that persists through changes to its attributes. A customer remains the same customer after changing their name, email, and address.
- Value Object – an immutable object defined by its values. An amount of money, an address, an email.
- Aggregate – a group of objects forming a single unit of consistency for writes. Access from outside always goes through the aggregate root. The aggregate boundary is the hardest decision in tactical DDD, and Aggregate Design devotes an entire chapter to it.
- Domain Event – a record of something that happened in the domain and that domain experts care about. The 2003 book does not yet include this pattern; Evans added it later.
- Repository – a collection-like interface over aggregate persistence.
- Domain Service – a stateless operation that does not naturally belong to any entity or value object.
- Factory – encapsulates complex creation of an aggregate so that it comes into existence already valid. More detail among the supporting patterns.
01.06 Implementing DDD in practice#
Introducing DDD typically takes eight steps. The first four belong to strategic design (contexts, language); the rest cover tactical design, implementation, and iterating on the model.
- Understanding the domain – Interviews with experts, workshops, whiteboard modeling. The goal is not to find the one correct model but to work through several competing alternatives and pick the one that fits the problem best. Without this phase, the model fails right at the start.
- Ubiquitous Language – A shared vocabulary for developers and domain experts, written down and kept up to date. The same terms in code, documentation, and the PM's emails.
- Identifying Bounded Contexts – The domain is split into smaller contexts with explicit boundaries. Each context has its own model.
- Context Map – Every relationship between contexts (Customer/Supplier, Conformist, Anti-Corruption Layer) is described and has a responsible team.
- Domain model – Entities, value objects, aggregates, domain services, and events are built separately in each context.
- Implementation – A layered or hexagonal architecture separates the domain model from the infrastructure layer.
- Testing – Unit tests cover the domain model; integration tests cover the connection to the database and other infrastructure.
- Iteration – The model keeps changing as understanding of the domain grows. DDD is not a one-time investment.
The ddd-crew group maintains a similar process. Its DDD Starter Modelling Process lays out the same ground in eight steps, from understanding the domain to code, and is available under a CC BY-SA license [11].
01.07 Benefits of DDD#
The first benefit of well-applied DDD shows up in communication. Ubiquitous Language reduces misunderstandings between developers and domain experts, because everyone uses the same terms in code and in conversation. Resilience to change follows from this: a domain-oriented model is more stable than one shaped by the database schema, and changes in business requirements map onto it more naturally.
Bounded Contexts then let you develop parts of the system independently and, when needed, deploy and scale them separately as well (DDD and Microservices). Domain objects without infrastructure dependencies are tested in isolation, without mocking (chapter on testing). An explicit model also carries the rules directly in the code, so documentation cannot drift away from the implementation. Technical debt does not disappear; it only gets harder to hide. And because DDD separates the Core Domain from supporting domains, it becomes clear where modeling effort is worth investing and where it is not.
Practical examples of Ubiquitous Language and other concepts are in the chapter DDD Building Blocks.
01.08 Challenges and limitations of DDD#
A decision to adopt DDD has to account for real costs:
- Complexity – It requires a deep understanding of both the domain and architectural principles. For developers without experience in object modeling, it is a big leap.
- Time investment – Modeling the domain and building a Ubiquitous Language take time right at the start of a project. The payoff comes only as rule complexity grows.
- Poor fit for simple applications – In CRUD applications with minimal domain logic, DDD adds overhead with no return.
- Integration with legacy systems – Connecting a DDD model to an old system typically requires an Anti-Corruption Layer, which has its own cost.
- Performance – A poor implementation risks the N+1 problem and loading needlessly large object graphs.
Then there is the human side. Without access to a domain expert, nobody can say which rules actually apply. Collaborating with experts also means regular workshops and a shared language, and some organizations are not set up for that. The team itself needs months to build a routine; a first DDD project is usually slower than the same project done as CRUD.
DDD-Lite: tactics without strategy
The most common failure is not that a team fails to adopt DDD. It adopts half of it. The team learns value objects, entities, aggregates, and repositories, declares the result DDD, and skips the strategic part. Vernon calls this practice DDD-Lite, but he means it as a warning, not as a lighter variant for smaller projects. Without Ubiquitous Language, Bounded Context, and Context Mapping, he argues, the result is an inferior domain model. What typically comes out is one model for the whole company, wrapped in patterns that were meant to solve something else.
Criticism and the state of the evidence
Objections also come from outside the community. Stefan Tilkov pushes back against the reflex of calling in DDD experts every time service boundaries come up; in his view, DDD is a useful means, not an end in itself [12]. A 2023 systematic review of 36 peer-reviewed studies takes a more sober look at the data. The systems studied improved after adopting DDD, especially in combination with microservices. Some of the studies, however, lack empirical validation, and the main barrier to adoption remains the demands on expertise and onboarding [13]. The benefits from the previous section are therefore based on experience, not measurement. That is how this book treats them, too.
01.09 DDD vs. other approaches#
DDD is most often compared with four approaches. Transaction Script and CRUD are alternatives for simpler domains. Hexagonal architecture and microservices address a different layer of the problem and are combined with DDD:
- DDD vs. Transaction Script – Transaction Script (Martin Fowler, PoEAA) organizes logic around use cases: each one is a single procedure that reads data, applies rules, and stores the result. The difference: Transaction Script has no domain model. The logic sits in procedures, not in objects. For simple domains this is more straightforward; as complexity grows, rules get duplicated and the code becomes harder to maintain. DDD comes out ahead once several use cases share the same domain rules.
- DDD vs. CRUD – CRUD (Create, Read, Update, Delete) is a data-oriented approach: the application is an editor for database tables. The difference: CRUD does not distinguish between domain behavior and data operations. Every action is a variation on reading or writing a row. DDD, by contrast, models the behavior of the domain (an order is not merely “updated” but “confirmed,” “cancelled,” or “shipped”). For plain data management, CRUD is enough.
- DDD vs. Hexagonal architecture – Hexagonal architecture (Ports and Adapters, Alistair Cockburn) addresses how to structure dependencies: the domain core communicates with the outside world through ports (interfaces) and adapters (implementations). The difference: DDD addresses how to model the domain (Entities, Value Objects, Aggregates), hexagonal architecture how to separate the domain from infrastructure. The two approaches therefore complement each other. Choosing between hexagonal, onion, and clean architecture is covered in the chapter on architectural styles.
- DDD vs. microservices – Microservices are an architectural style that addresses how to deploy and scale parts of a system independently. The difference: DDD deals with the logical boundaries of the domain (Bounded Contexts), microservices with the physical boundaries of deployment. A Bounded Context is a natural candidate for a microservice boundary, but that does not hold automatically. One Bounded Context can be implemented as several microservices, and vice versa. DDD also works in a monolithic architecture.
01.10 Summary#
DDD makes decisions at two levels, strategic and tactical. A third layer consists of the implementation patterns that build on them:
- Strategic design – Core Domain, Bounded Contexts, Context Map including the Anti-Corruption Layer, Ubiquitous Language
- Tactical design – Entities, Value Objects, Aggregates, Repositories, Domain Events, Services, Factories
- Implementation patterns – Specification, Saga / Process Manager
DDD proves its worth in applications with a rich domain, where precise modeling of business logic pays back. It has real costs, so it calls for a conscious decision: learning the patterns, carrying higher upfront complexity, and working with domain experts.
Frequently asked questions
What is Domain-Driven Design?
Domain-Driven Design (DDD) is an approach to software development that puts domain modeling at the center of the entire design. Eric Evans described it systematically in his 2003 book. The goal is for software to reflect as closely as possible how domain experts think about their field, and for that alignment to hold as the application grows. Details are in the Defining DDD section.
What is Ubiquitous Language in DDD?
Ubiquitous Language is a shared vocabulary that developers and domain experts use when designing, discussing, and implementing a system. It always applies within a single Bounded Context, not across the whole company. The boundary is part of the definition Evans gives. The same terms appear in domain documentation, in conversations about the model, and directly in code, so the code does not model something other than what the domain needs. More in the Ubiquitous Language in practice section.
What is a Bounded Context and what is it for?
A Bounded Context is an explicitly defined boundary within which one consistent domain model and one Ubiquitous Language apply. Outside that boundary, the same terms can mean something else. For example, “Customer” in billing and “Customer” in support are different models with different attributes. Bounded Contexts help split a complex domain into smaller, manageable parts. They are a natural candidate for a microservice boundary, but that does not hold automatically: one Bounded Context can be deployed as several services or as a module in a monolith. See the subsection on Bounded Context.
When does DDD not pay off?
In short: DDD does not deliver commensurate value on projects with trivial domain logic, in teams without access to domain experts, or when the product has a short horizon. A detailed analysis of the conditions, warning signs, and alternatives is in the separate chapter When Not to Use DDD.
01.11 Further reading#
Main sources:
- Domain Language – the official site of Eric Evans and the DDD community
- Domain-Driven Design Reference (PDF, CC-BY) – Eric Evans, 2015 – definitions and summaries of all the patterns in 52 free pages; the cheapest entry point into the subject
- Domain-Driven Design: Tackling Complexity in the Heart of Software – Eric Evans
- Implementing Domain-Driven Design – Vaughn Vernon
- Domain-Driven Design Distilled – Vaughn Vernon
- DDD Community
- DDD Starter Modelling Process – ddd-crew – a maintained eight-step process for introducing DDD, CC BY-SA
01.12 How to read this book#
This chapter is the first of 24. Each one builds on the ones before it, yet few readers need to go from the first to the last. Most arrive with a specific pain point, and the book is designed for selective reading as well.
For detailed reading paths by role (junior/mid Symfony developer, senior PHP developer, architect, tech lead, developer migrating from CRUD), see the Preface, section “How to read this book”. A brief overview of the book's parts:
- Strategic design (ch. 2–5) answers the question of where to apply DDD. Subdomains, Bounded Contexts, Event Storming, Team Topologies. Readers who leave this chapter feeling that DDD is not for their project will find the reasons in chapters 2–5. Those who leave with the opposite feeling will find the tools to get started there.
- Tactical design (ch. 6–8) covers the concrete building blocks: entities, value objects, aggregates, and supporting patterns. Its focal point is aggregate design, the hardest decision in tactical DDD.
- Architecture and implementation in Symfony (ch. 9–11) opens with a comparison of architectural styles and then translates the theory into concrete Symfony 8 code with Doctrine ORM, Messenger, and PHP 8.4 features. The part closes with authorization in four layers.
- Advanced patterns and performance (ch. 12–16) cover CQRS, Event Sourcing, Sagas, the Outbox Pattern, and read models. They do not fit every project, so the chapters also discuss when they do not pay off.
- Practice (ch. 17–22) brings together testing, migration and microservices, operational problems, anti-patterns, and the question of when not to use DDD. The book closes with practical examples and a case study (ch. 23–24).
If you are unsure whether to continue at all, here is one way to proceed. After this chapter, read When Not to Use DDD. If both suggest that DDD pays off in your project, continue with chapter 2, Subdomains. If you are still unsure, the Cheat Sheet offers a one-page overview for quick orientation.
For term definitions, see the Glossary. Many chapters summarize the books and articles they cite in a “Further Reading” section (in this chapter, 01.11). A combined list of books, conferences, and tools is on the Resources page. What working with language models means for domain modeling is covered on a separate page, DDD and Artificial Intelligence.