Do order and invoice mean the same by “amount”? No: the order means the order total, the invoice the invoice amount. Each bounded context defines its own meaning.Bounded Context
This is how the building blocks hang together
Domain-driven design connects domain knowledge and model. Ubiquitous language sharpens terms, bounded contexts mark where they are valid, value objects and aggregates shape states, and the context map and ACL govern the transitions.
Domain modelling clarifies which words apply in the shop, where a model ends and how models relate. That way order and invoice do not mean the same by “amount”, and every rule has its place. Each building block shows its theme at our shop.
This is what you learnYou can classify subdomains as core, supportive, or generic and steer the modeling effort accordingly.
In the shopIn the shop, not all modules are equally important. The order rules distinguish him, the payment he buys from the payment provider. The team then adjusts its modelling effort.
This is what you learnYou can replace ambiguous shop terms with precise technical terms that are uniform in the respective context.
In the shopThe shop team clarifies the words order, reservation, authorization and invoice. Each term receives a testable meaning in the appropriate context.
This is what you learnYou can distinguish objects with persistent identity from immutable business values.
In the shopOrder B-1042 Despite the change of status, the same order remains. Two sums of money from 49,90 EUR are technically the same as soon as the amount and currency match.
This is what you learnDesign value objects as value-equal business units and centralise their rules.
In the shopThe two mugs in B-1042 cost 49.90 EUR in total. Compare identical amounts, different currencies and matching address details. The USD variant is used only for comparison.
This is what you learnDistinguish entity identity from mutable attributes and reason about business state changes.
In the shopFollow B-1042 from creation to confirmation. Then compare B-1042 with a hypothetical second order, B-1043: identical items do not make them the same order.
This is what you learnYou can set a consistency boundary and make changes about its business root.
In the shopOrder B-1042 contains positions and a delivery address. Their rules require at least one position, a positive amount per position and an order sum that matches the positions.
This is what you learnYou can describe relationships between business contexts with direction, information exchanged, and translation.
In the shopIn the shop, there are relationships within the team, in which warehouse, payment and order are coordinated. Externally, there is a relationship with the payment provider, whose model does not influence the shop.
This is what you learnYou can translate a foreign data model into your own specialist model at an integration boundary.
In the shopThe payment provider provides the codes APPROVED, DECLINED and PENDING_REVIEW. The shop uses its own states authorized, rejected and clarification is ongoing.