- **Epistemic status:** #evergreen
Domain Driven Design or DDD for short focuses on engineering models in software that correspond to a business domain, with rules and guidelines allowing them to interact with each other. A key concept in DDD is [[Ubiquitous Language]] facilitating communication between project participants. This approach was first introduced by a programmer, **Eric Evans** in 2004 in his book **Domain-Driven Design: Tackling Complexity in Heart of Software**. He explains that when we are developing software the focus should be primarily in the business and not in the technology since ultimately the customer gets to decide whether the system is great or not.
There are two tools in DDD: Strategic design tools and tactical design tools.
## Strategic Design Tools
Strategic design tools helps us solve problems related to software modeling by being forced to think in terms of context. The following are terms used in strategic design phase:
- [[Data Modeling]]
- [[Ubiquitous Language]]
- [[Bounded Context]]
## Tactical Design Tools
Tactical design tools helps us solve the implementation details like [[Data Modeling]] on the product development phase. The following are terms used in tactical design phase:
- **Entity -** An object with a unique identity that persists over time that implements some business logic, e.g., in a health care application, doctors, and records would be entities
- **Value Object** – Immutable, light-weight object that have no identity. They reduce complexity by performing complex calculations and isolating computational logic from entities.
- **Services -** Stateless class that contains some functionality that fits somewhere else other than entities and value objects
- **Aggregates -** A collection of entities and values which come under a single transaction boundary One entity in an aggregate must be pointed as the root, meanwhile all other entities are children of the root. They model the complex web of relationships that can happen in the real world, e.g., customers create orders, orders contain products, products have suppliers, and so on.
## Advantages of Domain Driven Design
- Reduces communication gap between teams using [[Ubiquitous Language]]
- It provides flexibility
## Disadvantages of Domain Driven Design
- Requires a domain expert
---
## References
- “Domain-Driven Design (DDD) - GeeksforGeeks.” Accessed January 27, 2022. <https://www.geeksforgeeks.org/domain-driven-design-ddd/>.
- Robert. “DDD — Domain Driven Design.” _Domain Driven Design_ (blog), May 3, 2021. <https://domaindrivendesign.org/ddd-domain-driven-design/>.
- “The Main Goal of Domain-Driven Design.” _Domain Driven Design_ (blog), February 3, 2021. <https://domaindrivendesign.org/the-main-goal-of-domain-driven-design/>.
- Agile Alliance |. “What Is Ubiquitous Language?,” December 17, 2015. <https://www.agilealliance.org/glossary/ubiquitous-language/>.
- EdPrice-MSFT. “Using Tactical DDD to Design Microservices - Azure Architecture Center.” Accessed February 3, 2022. <https://docs.microsoft.com/en-us/azure/architecture/microservices/model/tactical-ddd>.