How to build applications based on business' concepts
Code must be build using business' language
Exchanges with Domain Experts are frequent and the language evolves with the understanding
Business understanding get refined with code
Code helps understanding the business
Code sustainability
Code is understandable by business experts
Many terms are intentionally omitted
Ubiquitous language : A language structured around the domain model and used by all team members to connect all the activities of the team with the software.
Refactoring toward deeper insight : As business understanding evolves, deep design flaws appear and must be fixed. This often involves wide refactoring but is necessary.
Intention-revealing interfaces
interface ErpService {
getHourlyRate(sapId: Int) : Double
}vs
interface PayrollService {
getHourlyRate(employee: Employee) : Double
}Entities : An object that is defined by it's identity rather than its attributes.
Value objects : An object that has attributes but no identity.
Being an entity or a value object is context dependant
Aggregates : A collection of objects that are bound together by a root entity
Bounded context : A business context holding all its necessary and sufficient data and logic to perform the business.
Services : They are the business logic in the domain that are not a natural part of an Entity or Value Object.
Factories : They are responsible of creating and managing other complex objects, like aggregates.
Repositories : Encapsulate persistence and retrieval of domain objects. Act as collections.
Context map : Documents links between two or more bounded context
Anticorruption layer : It is a mean to link two bounded contexts
Core domain : Where the business value resides
Generic subdomains : Domains with (technical) complexity but with low business value.
24 concepts, 32 links, thousands pages
Domain-Driven Design : Tackling Complexity in the Heart of Software, Eric Evans, 2003, 560 pages
Implementing Domain-Driven Design, Vaughn Vernon, 2013, 656 pages
Domain-Driven Design Reference: Definitions and Pattern Summaries, Eric Evans, 2014, 88 pages