Reputation: 4251
My friend came across this question in an interview which we still not able to find answer for.
What is the difference between root and aggregate root in DDD?
We are aware that there is aggregate root but not aware of root concept in DDD so is this a valid question and if so then what is the difference?
Upvotes: 0
Views: 82
Reputation: 1938
Can an entity exist outside of another entity? If not, it's not the aggregate root. An OrderItem is an entity, but doesn't have any reality outside the context of an Order.
Second on review Chapter 6 of DDD.
Upvotes: 0
Reputation: 57204
In the contexts that I am familiar with, "root" is an abbreviation of "aggregate root"; an aggregate may contain more than one entity, but the application layer is only allowed to interact with the entity that plays the role of the aggregate root.
See Chapter 6 of the Evans Domain Driven Design book.
Upvotes: 4