Architecturecontext mapddd bounded context

Bounded context

Definition

A bounded context is the explicit boundary within which a particular domain model and its ubiquitous language are defined and consistent.

In practice

One shared model for a whole business breaks down: "product" means a priced listing in Sales, a stock item with weight and bin location in Shipping, and a tax category in Billing. Giving each context its own model, linked by a shared id, keeps each one simple. Bounded contexts are natural candidates for modules or services.

Contexts integrate through published contracts and events and are eventually consistent with each other. A context map records how they relate (upstream/downstream, conformist, anti-corruption layer, shared kernel). Drawing contexts around technical layers or teams' convenience instead of language and capability defeats the purpose.

Example

Sales has Product { Sku, Price, Description }, Shipping has StockItem { Sku, WeightKg, Bin }; both use SKU A-1042 as the shared identifier.