Problem
In large systems the same word, such as Customer or Product, means different things to different teams. A single shared model becomes bloated, contradictory, and impossible to change safely.
Also known as: ddd-bounded-context, model-boundary
Define an explicit boundary within which a domain model and its language are consistent and unambiguous.
In large systems the same word, such as Customer or Product, means different things to different teams. A single shared model becomes bloated, contradictory, and impossible to change safely.
A bounded context is the part of a system where a particular model applies. In a retail company, Sales sees a Customer as a buyer with a cart; Support sees a Customer as a ticket owner; Billing sees an account with invoices. Each model is right inside its own context.
Discover contexts through event storming and conversations with domain experts. Listen for language shifts: when a term changes meaning, you have likely crossed a boundary. Then give each context its own model, repository, and ideally its own schema.
[Sales] [Billing] [Support]
Customer Account Requester
Cart Invoice Ticket
\_____ events / APIs / translation _____/
Contexts exchange data by identifiers and published messages. For example, Sales publishes OrderPlaced with a customer ID and amount; Billing creates its own Invoice from it and never reads Sales tables.
None directly — may map to separate services
Low to medium — depends on deployment split
Medium — requires domain discovery
Boundaries drawn along technical layers instead of language
Shared database that couples contexts despite separate code
Too many tiny contexts creating integration overload