Context Map — Strategic DDD
This guide is split into three parts, and you are on Short info. Continue with the tutorial or browse the samples.
Summary
Section titled “Summary”A Context Map answers: where do meanings and ownership change, and what relationships connect those boundaries?
When to use it
Section titled “When to use it”Use it when teams, subsystems or external providers interpret related concepts differently. Start with two bounded contexts and a deliberately chosen relationship. A bounded context can live inside a monolith; deploying microservices is not a prerequisite. Focus on language, dependency direction and collaboration rather than drawing the network.
Common mistakes
Section titled “Common mistakes”- Drawing deployment boundaries and assuming they establish domain meanings.
- Leaving dependency direction or ownership ambiguous.
- Choosing a relationship pattern without discussing its change and coordination costs.
Background and history
Section titled “Background and history”Context mapping is part of strategic Domain-Driven Design. It describes relationships between bounded contexts instead of the internal design of an aggregate. Context Mapper’s reference makes these patterns concrete in a modeling language, while ContextBrew offers its own representation and an import/export subset.
The pattern on an edge is a design decision. A downstream team may accept an upstream model, negotiate a customer–supplier relationship, or translate through an anticorruption layer. The correct choice depends on control, collaboration and change cost. Show direction and ownership so reviewers can discuss those consequences. A strategic relationship does not by itself specify a wire protocol; connect it to SIM when the integration contract needs detail.
Alternatives and trade-offs
Section titled “Alternatives and trade-offs”A team ownership map emphasizes responsibility, C4 emphasizes architecture, and SIM emphasizes technical interaction. A generic dependency graph is cheaper but loses the relationship vocabulary. Bounded Contexts is a related facet view for inspecting boundaries, not a second independent strategic authority.
References
Section titled “References”- Context Mapper’s reference
- Learning with models — choose a practice workflow and interpret its results.
Where it fits
Section titled “Where it fits”| Model | Captures | Use case |
|---|---|---|
| DDD | Domain (aggregates, invariants) | Tactical |
| Context Map | Bounded contexts + integration patterns | Strategic |
| ESDM | Event-sourced tactical decomposition | Tactical + integration |
| C4 | Static architecture | Architecture |
Integration pattern vocabulary
Section titled “Integration pattern vocabulary”Nine patterns, grouped:
- Symmetric (mutual): Partnership · Shared Kernel
- Asymmetric (upstream/downstream): Customer-Supplier · Conformist · Anticorruption Layer
- Open-host (publish / consume): Open Host Service · Published Language
- Quarantine / anti-patterns: Separate Ways · Big Ball of Mud
Every edge in the file carries one of these pattern literals.
File format
Section titled “File format”Stored as models/context-map.json. See the context-map schema page for the normative JSON Schema and committed sample files.
Cross-model links
Section titled “Cross-model links”Each context can carry termIds (its owned ubiquitous-language terms) which feed the cross-model consistency validator. The context IDs are referenced by DDD aggregate scopes and by ESDM boundedContext names.
