DDD FAQ
What qualifies as an Entity?​
In Domain Driven Design (DDD), an object qualifies as an entity if it meets the following criteria:
- Unique Identity: It must have a unique identifier that distinguishes it from other instances, even if other attributes are identical.
- Mutable State: Unlike value objects, entities can change their properties or state while retaining their identity.
- Encapsulates Business Rules: It contains business logic and rules that dictate how its state can be changed and interacted with.
- Lifecycle Management: Entities have clear lifecycle management, with creation, updates, and possibly deletion being part of their behavior.
Examples in the Owner Community space:​
- Community
- Member
- Account
What qualifies as an Aggregate-Root?​
In Domain Driven Design (DDD), an object qualifies as an Aggregate-Root if it meets the following criteria:
- Single Point of Entry: From a DDD perspective, Aggregate Roots are the only members of an aggregate that external objects are allowed to hold references to.
- Boundary of an Aggregate: It serves as the boundary for a cluster of associated objects (entities and value objects), treated as a single unit.
- Domain Rule Enforcement: It is responsible for enforcing business rules across the aggregate, ensuring that the rules are applied correctly to maintain business logic integrity.
Examples in the Owner Community space:​
- Community