Intermediate Topic 33 of 50 Software Engineering
Domain-Driven Design
Modeling software around the business domain's language.
How it works
Domain-driven design focuses on modeling the business domain in close collaboration with domain experts. It uses a ubiquitous language shared by developers and experts, bounded contexts that define where a model applies, and tactical building blocks: entities with identity, value objects, aggregates that guard consistency boundaries, repositories, domain services and domain events. Strategic design maps relationships between contexts, such as customer-supplier and anti-corruption layers.
Step-by-step walkthrough
- Developers and experts share one vocabulary, the ubiquitous language.
- The system is split into bounded contexts where terms have one meaning.
- Another context may use the same word differently.
- Aggregates group entities that must stay consistent.
- Models mirror the business domain.
Where it is used
Complex business domains such as insurance, logistics, banking and healthcare, and the decomposition of large systems into microservices, use DDD to keep the code aligned with business concepts.
Common pitfall
It is heavy for simple CRUD applications. Teams adopt the tactical patterns without the collaboration and language work, getting little benefit. Aggregates that are too large cause contention, and bounded contexts drawn wrongly cause coupling. Start with discovery sessions such as event storming and keep models small and explicit.
Where it fits in the course
Domain-Driven Design is topic 33 of 50 in Software Engineering, rated Intermediate. It follows Clean Architecture. The next topic is Microservices.
Practice and explore
- Open the interactive lesson, with a mini quiz.
- Take the Software Engineering quiz.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the Software Engineering quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is Domain-Driven Design?
Where do people use Domain-Driven Design?
What is the most common mistake with Domain-Driven Design?
What should I learn before this topic?
How can I practice it?
Is Domain-Driven Design hard to learn?
How long does it take to learn Domain-Driven Design?
Which topics are related to Domain-Driven Design?
What should I study after Domain-Driven Design?
Related topics
- Clean Architecture (Software Engineering)
- Microservices (Software Engineering)
- Layered Architecture (Software Engineering)
- Monolith vs Microservices (Software Engineering)
- Responsive Design (Web Development)
- Event-Driven Concurrency (Concurrency & Parallelism)
- Low-Power Design (Mobile, Embedded & IoT)