Wednesday, February 25, 2015

What is Aggregate in DDD?

From Eric Evans book DDD Page 90
An AGGREGATE is a cluster of associated objects that we treat as a unit for the purpose of data changes. Each AGGREGATE has a root and a boundary. The boundary defines what is inside the AGGREGATE. The root is a single specific ENTITY contained in the AGGREGATE. The root is the only member of the AGGREGATE that outside objects are allowed to hold references to, although objects within the boundary may hold references to each other. ENTITIES other than the root have local identity, but it only needs to be unique within the aggregate, since no outside object can ever see it out of the context of the root ENTITY.

By Martin Fowler
a cluster of domain objects that can be treated as a single unit.
http://martinfowler.com/bliki/DDD_Aggregate.html

No comments:

Post a Comment