Domain Driven Design (DDD) is a software development approach that involves focusing on the core domain and domain logic. It uses a ubiquitous language to ensure all elements of the system share a common conceptual model. The key elements of DDD include entities that have identities, value objects without identities, aggregates that group related entities and values, factories that construct complex objects, services for non-domain operations, modules that represent subdomains, and repositories that manage entities and aggregates storage and retrieval. The goal is to build software that is an explicit model of the domain it is describing.
8. Model Driven Design
● Is important to divide the application domain
● The application construction must explain
about the domain
9. Entities
● Everything that needs an identity
● Needs to be uniquely referenced
● Examples: Order, Product, Route, etc.
10. Value Objects
● Elements that dont need an identity
● Fast life-cicle
● Can be constant
● Example: Delivery address, Credit card
number, Font type, etc.
11. Agregates
● Encapsulate Entities and Value Objects from a
comnon subject, to give easy acess to useful
data
Entity Value Object
Value Object Entity
Agregate
12. Factories
● Used to construct some elements when it is
complex.
● Used in Agregates and Vaue objects
● Encapsulate the contruction process
13. Services
● Is an operation that is not part of any Entity or
Value Object
● Stateless
● Follow the Ubiquitous Language
14. Modules
● Are like chapters from a story
● Are about model, not about code
15. Repositories
● Used to store/retieve Entities and Agregates
● Is centralized
16. Global vision
Ubiquitous Language Model Driven Design
Services Modules
Value Objects Entities
Factory
Agregate Repository