[Validation] Check that the application follows DDD precisely
#134 opened on Jun 25, 2025
Repository metrics
- Stars
- (2 stars)
- PR merge metrics
- (PR metrics pending)
Description
Topic 1: The root Entity has global identity and is ultimately responsible for checking invariants Root Entities have global identity. Entities inside the boundary have local identity, unique only within the Aggregate. Nothing outside the Aggregate boundary can hold a reference to anything inside, except to the root Entity. The root Entity can hand references to the internal Entities to other objects, but they can only use them transiently (within a single method or block). Only Aggregate Roots can be obtained directly with database queries. Everything else must be done through traversal. Objects within the Aggregate can hold references to other Aggregate roots. A delete operation must remove everything within the Aggregate boundary all at once When a change to any object within the Aggregate boundary is committed, all invariants of the whole Aggregate must be satisfied.
Topic 2: Aggregates are the basic element of transfer of data storage - you request to load or save whole aggregates. Transactions should not cross aggregate boundaries.
Topic 3: Should no be a case where: Aggregate A raises a domain event, and then in the handler we change this Aggregate once again!
Topic 4: ...