Scope | Phases | Roles | Activities | Abstraction/Refinement Level |
---|---|---|---|---|
System landscapes, team organization |
n/a (continuous) |
All cross-project roles |
Strategic DDD |
Conceptual |
In domain-driven design, a context map shows bounded contexts (model boundaries, of different types) and their relations (e.g., influence flows).
A context map visualizes the relationships between Bounded Contexts in Strategic DDD. Several types of such relationships have been described as patterns; Bounded Contexts abstract from functional feature sets, existing or future application, systems, and teams.
The different types of map correspond to the following activities:
- Strategic DDD (feature, application maps)
- System decomposition (application and system maps)
- Team organization in SAFe, Scrum of Scrums (team maps)
See activity description for Strategic DDD for more context and usage information.
DDD as such does not mandate any notation. Each author and presenter has his/her own style. The following visualization of context maps has become quite popular:
Strategic DDD models influence and data flows, following a stream or river metaphor. The upstream U
provides information or services consumed by the downstream D
. The DDD relationship types either pertain to the relation itself and or its upstream and downstream ends.
The above context map was generated from this DSL model (Context Mapper):
ContextMap DDDSampleMap {
contains CargoBookingContext
contains VoyagePlanningContext
contains LocationContext
CargoBookingContext [SK]<->[SK] VoyagePlanningContext
CargoBookingContext [D]<-[U,OHS,PL] LocationContext
VoyagePlanningContext [D]<-[U,OHS,PL] LocationContext
}
SK indicates a Shared Kernel relationship. OHS stands for Open Host Service, PL for Published Language. See activity description for Strategic DDD for pattern descriptions.
Both informal, ad hoc modeling and somewhat more diligent approaches are supported:
- Context Mapper provides a DSL for DDD as well as transformation and refactoring tools. This paper summarizes the supported patterns and introduces the stepwise design approach and the tool support for it.
- Any drawing tool, including online and offline ones are often used.
- Whiteboards, both physical and virtual ones such as miro, also are a natural choice.
- Decide which type(s) of Bounded Context to support: Feature? Application? System? Team? See this paper for explanations.
- Specify the arrow/relationship semantics (DDD patterns? other?) and provide a figure legend as DDD does not mandate any particular notation.
- See Architecture Modeling activity for more modeling hints, including variants of the general "keep it simple" rule.
See activity description of Strategic DDD.
- System Context Diagram
- Domain Model
- C4 models and other representations of architecture overviews and component models
"Strategic Domain Driven Design with Context Mapping" by Alberto Brandolini introduces context maps by scenario and example.
Context Maps are covered in depth in the book "Implementing Domain-Driven Design" by Vaughn Vernon (@Vernon:2013).
The language reference of the Context Mapper DSL can be found here and this conference presentation gives an overview.
The Feature, Application, System, Team (FAST) taxonomy is introduced in "Domain-driven Architecture Modeling and Rapid Prototyping with Context Mapper," by Stefan Kapferer and Olaf Zimmermann.
title: "Design Practice Repository (DPR): Context Map (Strategic DDD)"
author: Olaf Zimmermann (ZIO)
date: "03, 30, 2021"
copyright: Olaf Zimmermann, 2020-2021 (unless noted otherwise). All rights reserved.
license: Creative Commons Attribution 4.0 International License