Glossary
The DDD terms on this site
Every definition here is the site’s own wording, shown on the webshop running example, and each one links to the diagram that shows it.
- Aggregate
-
A cluster of entities and value objects that must stay consistent together, saved as one unit.
Shown in Tactical design · Building blocks
- Anticorruption layer
-
The downstream team translates a foreign model at the boundary so it never leaks in.
Shown in Strategic design · The context map
- Application service
-
Inside the Sales boundary the code is arranged in rings. The domain model sits in the centre. Application services around it are the checkpoints for use cases.
- Bounded context
-
A bounded context is a boundary around one model and one language. It is usually owned by one team, with its own code and its own data. Inside the boundary every word means one thing. Everything outside has to pass a checkpoint.
Shown in Strategic design · Bounded contexts
- Checkpoint
-
Three of the patterns on the context map are checkpoints: the places where a message crosses a boundary.
- Conformist
-
The downstream team simply adopts the upstream model as it is.
Shown in Strategic design · The context map
- Context map
-
A context map shows every bounded context in a system on one map, and how each pair of them relates. Each line is a relationship between two models and the teams behind them.
Shown in Strategic design · The context map
- Core subdomain
-
What sets this business apart from its competitors. It gets the best people, the deepest model and close work with the domain experts, and it is never bought off the shelf.
Shown in Strategic design · Subdomains
- Customer–supplier
-
The downstream team asks; the upstream team plans its needs into its work.
Shown in Strategic design · The context map
- Domain event
-
Something that happened, named in the past tense.
OrderPlacedcarries what Shipping and Billing need to know, nothing about how Order keeps its rules.Shown in Tactical design · Building blocks
- Domain service
-
Whether a customer may check out on account depends on what they already owe across every other order. Hand
OrdertheCustomerand it still can’t answer: no aggregate may go looking for its siblings.Shown in Tactical design · Building blocks
- Downstream
-
Each line is a relationship between two models and the teams behind them. In many of them one side is upstream: its model and its decisions influence the downstream side.
Shown in Strategic design · The context map
- Entity
-
Has an identity that stays the same while its data changes. Line 3 is still line 3 after you change the quantity.
Shown in Tactical design · Building blocks
- Factory
-
Builds a new, valid aggregate in one step.
Order.StartCartis the only way to get a first, empty order into existence — there is no other constructor to misuse.Shown in Tactical design · Building blocks
- Generic subdomain
-
A problem every business has, and one that others have already solved well. It is rarely worth inventing: buy it, rent it as a service, use open source or outsource it, whichever fits, and fit the shop around it.
Shown in Strategic design · Subdomains
- Module
-
A namespace that groups the model, not a boundary of its own.
Sales.Orderingholds Order, OrderLine, OrderPlaced and OrderRepository together, so the shape of the code matches the shape of the model.Shown in Tactical design · Building blocks
- Open host service
-
The upstream team offers one well-defined service that any context can use on the same terms.
Shown in Strategic design · The context map
- Partnership
-
Two teams that succeed or fail together plan and release together.
Shown in Strategic design · The context map
- Ports and adapters
-
Ports and adapters, also called hexagonal architecture, keeps the domain model at the centre of a context and everything technical at its edge.
- Problem space
-
Every piece of software serves a business. The problem space is that business and the parts it is made of, the subdomains. You discover them by learning how the business works.
Shown in Strategic design · Problem space and solution space
- Published language
-
A documented, versioned format that both sides agree to speak.
Shown in Strategic design · The context map
- Repository
-
One repository per aggregate, never per entity.
OrderRepositoryfinds and saves whole Orders; OrderLine never gets one of its own.Shown in Tactical design · Building blocks
- Separate ways
-
Integrating costs more than it gives, so the two contexts don’t connect at all.
Shown in Strategic design · The context map
- Solution space
-
The solution space is the software, split into models with clear boundaries, the bounded contexts. You design them, and they could be designed differently.
Shown in Strategic design · Problem space and solution space
- Strategic design
-
The solution space is the software, split into models with clear boundaries, the bounded contexts. You design them, and they could be designed differently. Strategic design is deciding where those boundaries go.
Shown in Strategic design · Problem space and solution space
- Subdomain
-
The problem space is that business and the parts it is made of, the subdomains. You discover them by learning how the business works.
Shown in Strategic design · Subdomains
- Supporting subdomain
-
Needed for the core to work, but not why customers choose the shop. It is built in-house when nothing ready-made fits, with a plain model and no more effort than it needs.
Shown in Strategic design · Subdomains
- Tactical design
-
Strategic design drew the boundaries between contexts, but the model and its language do not stop at a boundary. Tactical design gives you the building blocks to express that model in code, and the few checkpoints that let anything in or out.
- Ubiquitous language
-
The ubiquitous language is the one precise language that the domain experts, the team and the code share inside a bounded context. It is not a glossary handed down: the domain experts and the team work it out together in conversation, sharpen it as they learn, and use it everywhere, in meetings, documentation, tests and code.
- Upstream
-
Each line is a relationship between two models and the teams behind them. In many of them one side is upstream: its model and its decisions influence the downstream side.
Shown in Strategic design · The context map
- Value object
-
Defined only by its values, and it never changes. Two
Money.From(100, "DKK")are the same money.Shown in Tactical design · Building blocks