February 2013
Intermediate to advanced
656 pages
21h 26m
English
Prefer references to external Aggregates only by their globally unique identity, not by holding a direct object reference (or “pointer”). This is exemplified in Figure 10.6.
Figure 10.6. The BacklogItem Aggregate, inferring associations outside its boundary with identities
We would refactor the source to
public class BacklogItem extends ConcurrencySafeEntity { ... private ProductId productId; ... }
Aggregates with inferred object references are thus automatically smaller because references are never eagerly loaded. The model can perform better ...
Read now
Unlock full access