Loading lesson…
Level 1 · Apprentice0 XP
Domain-driven design's building blocks, in plain words.
Step 1 / 6
ProblemAny service can add a line to an order, change a price, or set the total directly. Totals no longer match the lines. Nobody knows which code path broke it.
← → step
Before this: Crossing boundaries with mappers
🛠️ Your turn
Reading is not the skill, doing is. Try for ten minutes before you open the hint. Getting stuck first is what makes the solution stick.
1.Create value objects Email and Money that validate themselves, and an aggregate ShoppingCart (root) with addItem and removeItem that keeps 'max 20 items' and 'total = sum of items' always true.