16 Nov 2023
Context mapping and strategic design are both important aspects of Domain-Driven Design (DDD), but they serve different purposes.
Context mapping is a visual representation of the bounded contexts in a system and the relationships between them. It is used to identify and clarify the boundaries between different parts of the system, and to ensure that each bounded context has a clear ownership model. A context map can also be used to identify potential communication and integration issues between bounded contexts.
Strategic design is a broader concept that encompasses the overall architecture of a DDD system. It includes decisions about how to divide the domain into subdomains, how to model those subdomains, and how to deploy the system into a production environment. Strategic design is informed by the context map, but it also takes into account other factors such as the organization's structure, the team's skills, and the project's budget.
Here is a table that summarizes the key differences between context mapping and strategic design:
| Feature | Context Mapping | Strategic Design |
|---|---|---|
| Purpose | Visualize bounded contexts and their relationships | Design the overall architecture of a DDD system |
| Scope | Focuses on the structure of the domain | Encompasses all aspects of the system architecture |
| Input | Domain expertise | Context map, domain expertise, organizational structure, team skills, project budget |
| Output | Context map | System architecture, deployment plan, team structure |
In practice, context mapping and strategic design are often done together. The context map is used to inform the strategic design, and the strategic design is used to refine the context map. This iterative process helps to ensure that the system architecture is aligned with the domain model and the organization's needs.