Effective Aggregate Design

This is a three-part series about using Domain-Driven Design (DDD) to implement Aggregates. Clustering Entities and Value Objects into an Aggregate with a carefully crafted consistency boundary may at first seem like quick work, but among all DDD tactical guidance, this pattern is one of the least well understood. This essay is the basis for Chapter 10 of my book, Implementing Domain-Driven Design.

The documents are available for download as three PDFs and are licensed under the Creative Commons Attribution-NoDerivs 3.0 Unported License.

Original English Edition

Effective Aggregate Design: Part 1
Effective Aggregate Design: Part 2
Effective Aggregate Design: Part 3

French Translation

Conception Efficace des Aggregates 1 ere Partie

 

Comments

  1. Fabien Tregan says:

    I translated the first part to French some time ago. I never made the translation really public because nobody took time to review it, but if you thing it can help you or you can help me, just take it there : https://github.com/FabienTregan/DDDTranslation

    • Thanks much! I am posting this and requesting feedback. I assume you have not changed the basic meaning and message, so it should be fine. If it goes well perhaps you’d like to complete Parts 2 and 3.

  2. Fabien Tregan says:

    I have not (intentionally) changed the meaning, but there could be typos/syntax errors, and the translations of the domain’s vocabulary is open to discussion (I’m not really pleased with several of them).
    As for translation of part 2 and 3, I would be happy to do them if there is interest (that’s a rather long but interesting task)

  3. Paul Burrows says:

    Hi Vaughn,

    Any chance you could provide a link or further explanation of how to solve this issue? It seems that this example excuses the use of “Cluster Aggregates” it certain scenarios, but what if as you said before, there could be a huge number of line items but there is still a requirement to ensure that the total number doesn’t exceed some limit?

    Thanks, and great book by the way!

    “A purchase order is assigned a maximum allowable total, and the sum of all line items must not surpass the total. The rule becomes tricky to enforce when multiple users simultaneously add line items. Any one addition is not permitted to exceed the limit, but concurrent additions by multiple users could collectively do so. I won’t repeat the solution here, but I want to emphasize that most of the time the invariants of business models are simpler to manage than that example.”

    • By definition of Aggregate, two or more uses must not be able to successfully use an Aggregate simultaneously. Only one user should win and all others should be shown a stale version type of error.