# Domain-Driven Design

An approach to complex software that builds evolving models from domain knowledge and aligns language, boundaries, code, and team collaboration.

- Type: framework
- Domain: Engineering & architecture
- Level: Advanced
- Last reviewed: 2026-09-22
- Original: [Soroush’s Product Wiki](<https://wiki.soroush.uk/topic/domain-driven-design/>)

## What it means

Domain-Driven Design, or DDD, centers software development on a model of the business domain: its concepts, rules, processes, and relationships. Developers and domain experts refine a shared ubiquitous language used in discussion and code. Large domains are divided into bounded contexts, each with an internally consistent model and explicit relationships to other contexts.

## Why it matters

In complex products, the hardest failures often come from misunderstood rules and ambiguous terms rather than programming syntax. DDD makes those assumptions discussable and places important business behavior in a model instead of scattering it across screens, scripts, and database procedures. Bounded contexts also help teams manage conflicting meanings and define clearer ownership boundaries.

## When to use it

Use DDD where domain rules are rich, changing, differentiating, or contested—for example lending, logistics, healthcare, or marketplace operations. Apply strategic patterns selectively even if tactical object patterns do not fit the technology. For straightforward data entry or commodity capabilities, elaborate domain modeling may cost more than it returns.

## How it works

1. Work with domain experts to explore workflows, rules, exceptions, terminology, and sources of complexity.
2. Develop a ubiquitous language and use it consistently in conversations, examples, tests, and code.
3. Separate the wider domain into subdomains and identify where distinct models need bounded contexts.
4. Map relationships between contexts, including ownership, translation, published interfaces, and dependencies.
5. Model behavior inside important contexts with suitable patterns such as entities, value objects, and aggregates.
6. Continuously refine the model as product learning reveals better language or boundaries.

## A practical example

A marketplace discovers that “order” means a commercial commitment in sales, a pick-and-pack instruction in fulfillment, and a settlement unit in finance. Rather than forcing one giant model, it creates separate bounded contexts and explicit mappings. Each team can evolve its rules without making every meaning of order change together.

## Where it breaks

DDD is a learning and design approach, not a folder structure or automatic route to microservices. It demands sustained access to knowledgeable people and willingness to revise code as understanding improves. Excessive tactical patterns can obscure simple logic, while poorly chosen context boundaries can move complexity into brittle integrations.

## Common mistakes

- Reducing DDD to entities, repositories, and other code patterns while skipping collaborative domain learning.
- Creating one enterprise-wide canonical model despite meaningful differences in language and responsibility.
- Assuming every bounded context must become a separately deployed microservice.
- Letting technical layers or organizational politics define boundaries without examining business cohesion.

## Visualization

[View the visualization on the website](<https://wiki.soroush.uk/topic/domain-driven-design/#visualization-domain-driven-design>)

## Sources

1. [Domain-Driven Design Reference](<https://www.domainlanguage.com/wp-content/uploads/2016/05/DDD_Reference_2015-03.pdf>) — Domain Language · Primary author reference
2. [Domain Driven Design](<https://martinfowler.com/bliki/DomainDrivenDesign.html>) — Martin Fowler · Expert overview
3. [Use Domain Analysis to Model Microservices](<https://learn.microsoft.com/en-us/azure/architecture/microservices/model/domain-analysis>) — Microsoft Learn · Institutional architecture guide

## Related topics

- [Modular Monolith](<https://wiki.soroush.uk/topic/modular-monolith/>)
- [Microservices Architecture](<https://wiki.soroush.uk/topic/microservices-architecture/>)
- [API-First Design](<https://wiki.soroush.uk/topic/api-first-design/>)
