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.
A context map shows the bounded contexts as boxes and labels each line with a pattern. Upstream (U) is the side whose changes flow down; downstream (D) is the side that has to adapt. The labels come from DDD: customer-supplier, conformist, anti-corruption layer, shared kernel, open host service, partnership and separate ways.
It maps the situation as it is, including politics: which team can say no, which system nobody dares to touch. That is what makes it useful before a migration out of a monolith: it shows which seams already exist and where a translation layer is needed. The DDD Crew context mapping repository has a cheat sheet of all the patterns.
Sources
- GitHub: ddd-crew/context-mapping github.com
Related terms
- Bounded context: A part of a system where each business term has one meaning and one model, with explicit translation at its edges.
- DDD (domain-driven design): Designing software around the business’s own language and rules, with the code split where that language changes meaning.
- Anti-corruption layer (ACL): A translation layer between your model and a legacy or external system, so its data shapes and quirks do not leak into your code.
- Customer-supplier (upstream and downstream): A relationship between two teams where the upstream team plans its changes with the needs of the downstream team that depends on it.
- 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.
- Open host service (published language): An upstream context offers one documented, stable protocol for all consumers instead of a custom integration for each, often with a published data format.
- Conformist (DDD): A downstream team adopts the upstream system’s model as it is, without translating it, because it cannot influence it and translation is not worth it.
- 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.
