liveBook · Manning

Aggregate

An aggregate is a cluster of related domain objects treated as a single consistency and modification boundary.

How 3 Manning books explain it

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.

Read how Collaborative Software Design: How to facilitate domain modeling decisions explains aggregate →

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

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.