liveBook · Manning

Aggregate root

An aggregate root is the designated domain object through which an aggregate’s members are accessed and its consistency rules are enforced.

How 3 Manning books explain it

Spring in Action, Sixth Edition

The designated domain object that serves as the entry point for access to the objects within an aggregate.

How it is used
Organizes order persistence around a domain object that owns its dependent tacos.
How deep it goes
Explains aggregate boundaries and JDBC save steps, then contrasts R2DBC repository behavior and MongoDB document mapping.
Examples
Uses a taco order, its tacos, ingredient references, and an order repository to illustrate aggregate boundaries.
What you can do after
Apply it via Spring repositories by organizing persistence around an order and its dependent tacos.

Read how Spring in Action, Sixth Edition explains aggregate root →

Simple Object-Oriented Design: Create clean, maintainable applications

An aggregate root is the designated domain object through which an aggregate's members and consistency rules are accessed and modified.

How it is used
Uses aggregate roots to control updates to complex object graphs and keep domain invariants consistent.
How deep it goes
Defines access and repository rules, then works through enrollment and cancellation updates while deferring deeper aggregate design.
Examples
Uses Basket with Items and Products, then Offering with Enrollment, available spots, enrollment, and cancellation.
What you can do after
Apply it by routing aggregate changes and persistence through a root while evaluating when smaller aggregates or eventual consistency fit.

Read how Simple Object-Oriented Design: Create clean, maintainable applications explains aggregate root →

Collaborative Software Design: How to facilitate domain modeling decisions

An aggregate root is the designated domain object through which modifications to an aggregate are managed.

How it is used
Uses aggregate roots to preserve business invariants while translating collaborative models into executable code.
How deep it goes
Explains consistency boundaries, transactions, invariants, and a simplified implementation, while stopping short of a complete production design.
Examples
Demonstrates ScheduledMovieSeating for seat allocation and ScheduledMovie for ticket capacity and request-size constraints.
What you can do after
Apply it by grouping related domain objects and routing invariant-sensitive modifications through one aggregate root.

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

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.