Version 2 by knutm
on Nov 27, 2008 11:14.

compared with
Current by knutm
on Dec 01, 2008 15:28.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (8)

View Page History
{excerpt}

"An AGGREGATE is a cluster of associated objects that we treat as a unit for the purpose of data changes." [Evans 2003]
"An AGGREGATE is a cluster of associated objects that we treat as a unit for the purpose of data changes. External references are restricted to one member of the Aggregate, designated as the root. A set of consistency rules applies within the Aggregate's boundaries." [smidigtonull:Evans 2003]

Aggregate is not a concrete domain object type, but rather an abstract design concept that groups a set of Entities and Value Objects together. An aggregate have one entity represented as the root entity for the aggregate. This root entity is the entry point for other objects outside the aggregate. See Package structure and layers for suggestions on how to visualize aggregates.
{excerpt}

One repository for each root entity is usually a good choice. Some suggests that you should not have lazy-loading within an aggregate, only for associations between objects in different aggregates. This of course depends on the amount of data within each root entity association. If memory consumption and slow database queries is not an issue, then you should not do lazy-loading at all.
Aggregate is not a concrete domain object type, but rather an abstract design concept that groups a set of Entities and Value Objects together. See Package structure and layers for suggestions on how to visualize aggregates.

One repository for each aggregate is usually a good choice. Some suggests that you should not have lazy-loading within an aggregate, only for associations between objects in different aggregates. This of course depends on the amount of data within each root entity association. If memory consumption and slow database queries is not an issue, then you should not do lazy-loading at all.
Questions:
*Questions*:
How to effectively reduce the number of associations, to prevent the entire model being loaded into memory ?
And how to implement domain objects containing data from other sources than the default database ?