Aggregate
An aggregate is a cluster of related domain objects treated as a single consistency and modification boundary.
Collaborative Software Design: How to facilitate domain modeling decisions
A consistency boundary is a boundary within which related state must satisfy business invariants as a single consistent unit.
- How it is used
- Uses aggregates to turn collaborative modeling constraints into implementable boundaries that preserve business invariants.
- How deep it goes
- Explains boundaries, transactions, aggregate roots, and invariant enforcement, then stops short of a complete implementation.
- Examples
- Uses seat allocation, scheduled movies, tickets, rows, and a simplified ScheduledMovie aggregate to illustrate invariant enforcement.
- What you can do after
- Builds aggregate boundaries and methods from modeled constraints while keeping related domain objects internally consistent.
Simple Object-Oriented Design: Create clean, maintainable applications
An aggregate is a cluster of related domain objects treated as a consistency boundary and accessed through a designated root.
- How it is used
- Defines a consistency boundary for clusters of domain objects and their persistence.
- How deep it goes
- Explains root-only access, repository boundaries, and a worked Offering–Enrollment design; defers deeper aggregate-root design.
- Examples
- Uses Basket–Item–Product and Offering–Enrollment relationships, including enrollment cancellation and available spots.
- What you can do after
- Apply it by routing related changes and persistence through an aggregate root while evaluating exceptions pragmatically.
Read how Simple Object-Oriented Design: Create clean, maintainable applications explains aggregate →
Spring in Action, Sixth Edition
An aggregate is a domain-driven design cluster of related objects treated as a unit for consistency and lifecycle management.
- How it is used
- Organizes domain objects and directs repository operations around an aggregate root.
- How deep it goes
- Defines membership and demonstrates multi-table saving, but defers broader domain-driven design beyond aggregates and roots.
- Examples
- Uses TacoOrder, Taco, Ingredient, IngredientRef, SQL tables, and a JdbcOrderRepository save operation.
- What you can do after
- Build it from scratch by defining an aggregate root, repository, schema relationships, and coordinated JDBC persistence.
Read how Spring in Action, Sixth Edition explains aggregate →
Related concepts
- domain eventproduces · A domain event is a record of a significant occurrence or state change in a business domain that may be relevant to subsequent behavior or decisions.
- business invariantaddresses · A business invariant is a condition that must remain true for a domain model to represent a valid business state.
- eventproduced by · An event is an occurrence, change, or associated record or notification recognized as significant within a system or context.
- domain layerpart of · A domain layer is an architectural part of an application that contains its domain concepts, rules, and behavior.
- domain-driven designpart of · Domain-driven design is a software design approach that centers models, structure, and terminology on the concepts, behavior, and boundaries of a problem domain.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


