Bounded context
A part of a system where each business term has one meaning and one model, with explicit translation at its edges.
A customer in sales has a pipeline stage, in billing a tax number, in support a ticket history. Forcing one shared customer model on all three makes every change risky. A bounded context gives each area its own model and its own data, and defines how they exchange information. Contexts are often the best candidates for module or service boundaries.
Martin Fowler calls it the central pattern of the strategic part of DDD. Inside a context the team keeps one ubiquitous language; between contexts, a context map says who is upstream and whether the border is crossed through an anti-corruption layer, a shared kernel or a published contract.
Sources
- Martin Fowler: Bounded Context martinfowler.com
Related terms
- DDD (domain-driven design): Designing software around the business’s own language and rules, with the code split where that language changes meaning.
- Microservices: An architecture where a system is built from small, separately deployed services, each owning its data and talking to the others over the network.
- Modular monolith: One deployable application split inside into modules with clear boundaries, each owning its data and using the others only through defined interfaces.
- Database per service: Each service owns its data and no other service reads its tables directly; the others go through its API or its events.
- Context map (DDD): A diagram of the bounded contexts in a system and the kind of relationship between each pair: who depends on whom and how models are translated.
- Ubiquitous language: One shared vocabulary for a domain, used the same way by experts, developers and the code itself.
- Shared kernel (DDD): A small part of the domain model that two teams own together and change only by agreement, such as shared types or a common library.
- Partnership and separate ways (DDD): Two context-map patterns: two teams that plan and release together because they succeed or fail together, or two contexts that do not integrate at all.
- Monolith first: Building a new system as one deployable application and splitting it into services later, once the domain borders are known from real use.
