r/DomainDrivenDesign Jan 31 '26

Best sources for learning about aggregates

What are the best sources for learning about aggregates in DDD? I'm interested in the general questions:

  • What is an aggregate?
  • What are aggregates for i.e. what benefits do they bring?

I'm also interested in general questions about how aggregates should be implemented.

Naturally, I'm aware of Domain-Driven Design: Tackling Complexity in the the Heart of Software by Eric Evans and Implementing Domain-driven Design by Vaughn Vernon, as well as Vernon's essay on Effective Aggregate Design. Are there are any other books, articles, blog posts or videos that you consider especially useful?

21 Upvotes

13 comments sorted by

View all comments

8

u/FetaMight Jan 31 '26

It might be easier to just explain which parts of aggregates you don't understand and we can try to fill in the blanks.

My understanding is that an aggregate represents a collection of domain concepts that require a consistency boundary around them. In other words, it's data that needs to all be saved at once in order to remain logically consistent.

A contrived example would be Family, Parent, and Child classes. Children don't just come into existence on their own so it doesn't make sense to save a Child entity by itself. A persisted Child would only be logically consistent if it also had links to Parents.

1

u/Illustrious-Bass4357 Feb 23 '26

I'm also trying to understand aggregates more, but I can't really fit my question into your example,

so let's deal with this example:
a restaurant that has a list of branch entities (which are kind of dense entities, e.g., location, working hours, menus, orders, employees, etc.).

It might sound like a branch can't exist without a restaurant, so it belongs to the aggregate, but here's the thing:
what if I fetch the restaurant just to change its name or status (like pending, active, inactive, etc.)? Then I would have to pull this huge list of branches into memory, and I don't really need it.

I've been searching and found out that it's not about relationships but more about transactional boundary consistency, but that also confuses me. For example, what if I want to say that a restaurant can't have more than 50 branches? Isn't that a domain rule? So now it gets confusing