Factories in DDD
← Back to Tactical Design
Encapsulate complex object creation. When creating an aggregate or entity is complex, a factory hides the creation logic and ensures the object is created in a valid state. Factories can be standalone or methods on aggregate roots.
Key Properties
Related
- Factory Method (design pattern)
- Aggregates (factories create aggregates)