SlideShare a Scribd company logo
DDD Strategic Design
Introduction to Context Maps
Paulo Clavijo - April 2018DDD Guild - GSAD Dell-EMC
Domain-driven design - 10000 foot view
Strategic Design
Ideally, it would be preferable to have a single, unified model. While this is a noble goal, in
reality it typically fragments into multiple models. It is useful to recognize this fact of life and
work with it.
Strategic Design is a set of principles for maintaining model integrity, distillation of the
Domain Model and working with multiple models.
● Context
● Distillation
● Large-Scale Structure
Model Integrity Patterns
DDD Strategic Design - Context Maps - Paulo Clavijo - April 2018
Problem Space vs Solution Space
Sales
domain
Booking
domain
Marketing
domain
Problem Space (real world) Solution Space (domain model)
design process
Booking
context
Sales
context
Marketing
context
Dom
Ap ic o
Ser s
AP
/In
ef
In
as
c
e
Dat e
Architecture
do mo s he t ,
al p en po n a d
co sa f e c
Bounded Context
Multiple models are in play on any large project. Yet when code based on distinct models is combined, software becomes
buggy, unreliable, and difficult to understand. Communication among team members becomes confusing. It is often unclear
in what context a model should not be applied.
Therefore: Explicitly define the context within which a model applies. Explicitly set boundaries in terms of team
organization, usage within specific parts of the application, and physical manifestations such as code bases and
database schemas. Keep the model strictly consistent within these bounds, but don’t be distracted or confused by
issues outside.
Domain-Driven Design, Eric Evans
Bounded Context
Bounded Context gives team members a clear and shared understanding of what has to be consistent
and what can develop independently
Bounded Context
Out of context
Out of context
Ubi o s L u g , un e
an l om od
Un e n u d o l
Bounded Context
Large or complex models should be divided into bounded contexts where a model can be explicit by being
understood in a specific context.
customer
message
quote
quote
Sales context
Booking context
Marketing context
notes
customer
address
flight
payment
method
newsletter
customer
loyalty
booking
paid
flight
cancelled
booking
Big Ball of Mud
Bounded Context
There is no direct one to one correlation between
● Domain - Context
● Context - Module
● Context - Micro-service
Bounded Context
Context Map
An individual bounded context leaves some problems in the absence of a global view. The context of other models may still
be vague and in flux.
People on other teams won’t be very aware of the context bounds and will unknowingly make changes that blur the edges
or complicate the interconnections. When connections must be made between different contexts, they tend to bleed into
each other.
Therefore: Identify each model in play on the project and define its bounded context. This includes the implicit
models of non-object-oriented subsystems. Name each bounded context, and make the names part of the
ubiquitous language. Describe the points of contact between the models, outlining explicit translation for any
communication and highlighting any sharing. Map the existing terrain.
Domain-Driven Design, Eric Evans
Context Map
A model is valid in a specific context. Different context might need different version of the model, due to
specific purposes.
Define Bounded Contexts according to the way things are now. This is crucial. To be effective, the
Context Map must reflect the true practice of the teams, not the ideal organization
Types of Bounded Context Relationships
● Shared Kernel
● Customer / Supplier
● Conformist
● Anticorruption Layer
● Separate Ways
● Open Host Service
● Published Language
Shared Kernel
Two teams share a subset of the domain model
including code and maybe the database.
Teams involved must collaborate, any change in
a kernel model must be done only in
consultation with the other team.
Payroll context
employee
Employee Management
context
Em oy o l
Customer / Supplier
A Customer/Supplier or Consumer-Driven
Contract relationship is where the downstream
context defines the contract that they want the
upstream context to provide.
The two domains can still evolve independently,
as long as the upstream context fulfills its
obligations under the contract.
The downstream team, considered as the
customer, sometimes has veto rights.
Team 1
Team 2
Conformist
The downstream team conforms to the model of
the upstream team. There is no translation of
models and not vetoing. If the upstream model
is a mess, it propagates to the downstream
model.
Team 1
Team 2
bar
foo
bar
foo
Anticorruption Layer
A layer that isolates a client's model from
another's system model by translation. Team 1
Team 2
bar
foo
cat
zoo
ACL
Separate Ways
There is no connection between the bounded
contexts of a system. This allows teams to find
their own solutions in their domain.
Team 1 Team 2
pig
zoo
cat
zoo
Open Host Service
Each Bounded Context offers a defined set of
services that expose functionality for other
systems. Any downstream system can then
implement their own integration. This is
especially useful for integration requirements
with many other systems.
Team 1
Team 2
OHS
Published Language
Similar to OHS. However it goes as far as to
model a Domain as a common language
between bounded contexts.
Team 1
Team 2
PL
Language
Context Map - Examples
Context Map - Examples
Communication between Bounded Contexts
● Interfaces beetween modules (monolith)
● RPC with SOAP
● REST
● Using Events
Transfering data between Bounded Contexts
References
● Domain-Driven Design. Eric Evans (2003).
● Domain-Driven Design Distilled. Vaughn Vernon (2016).
● Implementing Domain Driven Design. Vaughn Vernon (2013).
● The Anatomy Of Domain-Driven Design. Scott Millett and Samuel Knight.
● Domain Modeling Made Functional. Scott Wlashchin (2018).

More Related Content

PPT
Domain Driven Design (DDD)
PPTX
Domain Driven Design(DDD) Presentation
PPTX
Domain Driven Design: Zero to Hero
PPTX
Domain driven design
PPTX
Domain Driven Design
PDF
Domain Driven Design
PDF
Domain Driven Design
PPT
Domain Driven Design Demonstrated
Domain Driven Design (DDD)
Domain Driven Design(DDD) Presentation
Domain Driven Design: Zero to Hero
Domain driven design
Domain Driven Design
Domain Driven Design
Domain Driven Design
Domain Driven Design Demonstrated

What's hot (20)

PPTX
Domain driven design
PPTX
Introduction to DDD
PDF
Preparing for a future Microservices journey using DDD & Wardley Maps
PDF
Implementing Domain-Driven Design (Study Group) Chapter 3 - Context Maps
PPTX
Domain Driven Design
PPTX
Domain Driven Design Introduction
PDF
Deconstructing Monoliths with Domain Driven Design
PPTX
Domain Driven Design
PPTX
Implementing DDD with C#
PDF
Introduction to Azure Data Lake
PPTX
Domain Driven Design 101
PDF
Intro to Web Development Using Python and Django
PDF
An Analytics Engineer’s Guide to Streaming With Amy Chen | Current 2022
PDF
OpenAPI 3.0, And What It Means for the Future of Swagger
PPTX
Enterprise Software Architecture styles
PDF
Data Warehouse Design and Best Practices
PDF
Building End-to-End Delta Pipelines on GCP
PPTX
Mainframe Modernization with Precisely and Microsoft Azure
ODP
Deep Dive Into Elasticsearch
PPTX
Domain-Driven Design
Domain driven design
Introduction to DDD
Preparing for a future Microservices journey using DDD & Wardley Maps
Implementing Domain-Driven Design (Study Group) Chapter 3 - Context Maps
Domain Driven Design
Domain Driven Design Introduction
Deconstructing Monoliths with Domain Driven Design
Domain Driven Design
Implementing DDD with C#
Introduction to Azure Data Lake
Domain Driven Design 101
Intro to Web Development Using Python and Django
An Analytics Engineer’s Guide to Streaming With Amy Chen | Current 2022
OpenAPI 3.0, And What It Means for the Future of Swagger
Enterprise Software Architecture styles
Data Warehouse Design and Best Practices
Building End-to-End Delta Pipelines on GCP
Mainframe Modernization with Precisely and Microsoft Azure
Deep Dive Into Elasticsearch
Domain-Driven Design
Ad

Similar to DDD Strategic Design - Context Maps - Paulo Clavijo - April 2018 (20)

PPTX
Ddd boundaries & responsibilities
PPTX
Domain driven design simplified
PPTX
Strategic Design - The Basics
PDF
Domain Driven Design (Ultra) Distilled
PPSX
Domain Driven Design
PDF
Extreme DDD Modelling Patterns - 2024 Devoxx Poland
PDF
Bounded Context - DDD Europe Foundation Track
PDF
Introduction to Domain Driven Design
PDF
DDD / Microservices @ Trivento Spring Camp, Utrecht, 2015
PDF
Methodology for MicroServices Inference v1.0
PPTX
Microservices Decomposition Patterns.v1.0.20191009
PPTX
Microservices Decomposition Patterns
PDF
1. Why Event-Driven Microservices _ Building Event-Driven Microservices.pdf
PDF
Building Beautiful Systems with Phoenix contexts and Domain-Driven Design
PDF
Re-engineering Technology to break barriers with Business
PPTX
Introducing domain driven design - dogfood con 2018
PPTX
Introducing Domain Driven Design - codemash
PPTX
Domain Driven Design & Hexagonal Architecture
PDF
The Art of Discovering Bounded Contexts
PPTX
DDD - What, why, how?
Ddd boundaries & responsibilities
Domain driven design simplified
Strategic Design - The Basics
Domain Driven Design (Ultra) Distilled
Domain Driven Design
Extreme DDD Modelling Patterns - 2024 Devoxx Poland
Bounded Context - DDD Europe Foundation Track
Introduction to Domain Driven Design
DDD / Microservices @ Trivento Spring Camp, Utrecht, 2015
Methodology for MicroServices Inference v1.0
Microservices Decomposition Patterns.v1.0.20191009
Microservices Decomposition Patterns
1. Why Event-Driven Microservices _ Building Event-Driven Microservices.pdf
Building Beautiful Systems with Phoenix contexts and Domain-Driven Design
Re-engineering Technology to break barriers with Business
Introducing domain driven design - dogfood con 2018
Introducing Domain Driven Design - codemash
Domain Driven Design & Hexagonal Architecture
The Art of Discovering Bounded Contexts
DDD - What, why, how?
Ad

More from Paulo Clavijo (15)

PDF
Consumer-Driven Contract Testing - Workshop - January 2021
PDF
User story slicing exercise
PDF
CI/CD non-breaking changes exercise - Cork Software Crafters - February 2020
PDF
Breaking Dependencies Legacy Code - Cork Software Crafters - September 2019
PDF
Legacy Code and Refactoring Workshop - Session 1 - October 2019
PDF
Approval Testing & Mutation Testing - Cork Software Crafters - June 2019
PDF
TDD and Simple Design Workshop - Session 1 - March 2019
PDF
TDD and Simple Design Workshop - Session 1 - November 2018
PDF
Outside-in TDD with Test Doubles
PDF
Angular and Redux
PDF
Consumer-Driven Contract Testing
PDF
ATDD - Desarrollo Dirigido por Test de Aceptación
PDF
Tests Unitarios con JUnit 4
PDF
Gestión de Cambios de BBDD con LiquiBase
PDF
Introducción a Spring Roo
Consumer-Driven Contract Testing - Workshop - January 2021
User story slicing exercise
CI/CD non-breaking changes exercise - Cork Software Crafters - February 2020
Breaking Dependencies Legacy Code - Cork Software Crafters - September 2019
Legacy Code and Refactoring Workshop - Session 1 - October 2019
Approval Testing & Mutation Testing - Cork Software Crafters - June 2019
TDD and Simple Design Workshop - Session 1 - March 2019
TDD and Simple Design Workshop - Session 1 - November 2018
Outside-in TDD with Test Doubles
Angular and Redux
Consumer-Driven Contract Testing
ATDD - Desarrollo Dirigido por Test de Aceptación
Tests Unitarios con JUnit 4
Gestión de Cambios de BBDD con LiquiBase
Introducción a Spring Roo

Recently uploaded (20)

PPTX
OOP with Java - Java Introduction (Basics)
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
Lesson 3_Tessellation.pptx finite Mathematics
PPTX
additive manufacturing of ss316l using mig welding
PPTX
Strings in CPP - Strings in C++ are sequences of characters used to store and...
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
Welding lecture in detail for understanding
PPTX
Foundation to blockchain - A guide to Blockchain Tech
DOCX
573137875-Attendance-Management-System-original
PPTX
web development for engineering and engineering
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPT
Project quality management in manufacturing
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
Lecture Notes Electrical Wiring System Components
PDF
composite construction of structures.pdf
PDF
Well-logging-methods_new................
OOP with Java - Java Introduction (Basics)
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
CH1 Production IntroductoryConcepts.pptx
CYBER-CRIMES AND SECURITY A guide to understanding
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Lesson 3_Tessellation.pptx finite Mathematics
additive manufacturing of ss316l using mig welding
Strings in CPP - Strings in C++ are sequences of characters used to store and...
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Welding lecture in detail for understanding
Foundation to blockchain - A guide to Blockchain Tech
573137875-Attendance-Management-System-original
web development for engineering and engineering
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Project quality management in manufacturing
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
Model Code of Practice - Construction Work - 21102022 .pdf
Lecture Notes Electrical Wiring System Components
composite construction of structures.pdf
Well-logging-methods_new................

DDD Strategic Design - Context Maps - Paulo Clavijo - April 2018

  • 1. DDD Strategic Design Introduction to Context Maps Paulo Clavijo - April 2018DDD Guild - GSAD Dell-EMC
  • 2. Domain-driven design - 10000 foot view
  • 3. Strategic Design Ideally, it would be preferable to have a single, unified model. While this is a noble goal, in reality it typically fragments into multiple models. It is useful to recognize this fact of life and work with it. Strategic Design is a set of principles for maintaining model integrity, distillation of the Domain Model and working with multiple models. ● Context ● Distillation ● Large-Scale Structure
  • 6. Problem Space vs Solution Space Sales domain Booking domain Marketing domain Problem Space (real world) Solution Space (domain model) design process Booking context Sales context Marketing context
  • 7. Dom Ap ic o Ser s AP /In ef In as c e Dat e Architecture do mo s he t , al p en po n a d co sa f e c
  • 8. Bounded Context Multiple models are in play on any large project. Yet when code based on distinct models is combined, software becomes buggy, unreliable, and difficult to understand. Communication among team members becomes confusing. It is often unclear in what context a model should not be applied. Therefore: Explicitly define the context within which a model applies. Explicitly set boundaries in terms of team organization, usage within specific parts of the application, and physical manifestations such as code bases and database schemas. Keep the model strictly consistent within these bounds, but don’t be distracted or confused by issues outside. Domain-Driven Design, Eric Evans
  • 9. Bounded Context Bounded Context gives team members a clear and shared understanding of what has to be consistent and what can develop independently Bounded Context Out of context Out of context Ubi o s L u g , un e an l om od Un e n u d o l
  • 10. Bounded Context Large or complex models should be divided into bounded contexts where a model can be explicit by being understood in a specific context. customer message quote quote Sales context Booking context Marketing context notes customer address flight payment method newsletter customer loyalty booking paid flight cancelled booking
  • 11. Big Ball of Mud Bounded Context
  • 12. There is no direct one to one correlation between ● Domain - Context ● Context - Module ● Context - Micro-service Bounded Context
  • 13. Context Map An individual bounded context leaves some problems in the absence of a global view. The context of other models may still be vague and in flux. People on other teams won’t be very aware of the context bounds and will unknowingly make changes that blur the edges or complicate the interconnections. When connections must be made between different contexts, they tend to bleed into each other. Therefore: Identify each model in play on the project and define its bounded context. This includes the implicit models of non-object-oriented subsystems. Name each bounded context, and make the names part of the ubiquitous language. Describe the points of contact between the models, outlining explicit translation for any communication and highlighting any sharing. Map the existing terrain. Domain-Driven Design, Eric Evans
  • 14. Context Map A model is valid in a specific context. Different context might need different version of the model, due to specific purposes. Define Bounded Contexts according to the way things are now. This is crucial. To be effective, the Context Map must reflect the true practice of the teams, not the ideal organization
  • 15. Types of Bounded Context Relationships ● Shared Kernel ● Customer / Supplier ● Conformist ● Anticorruption Layer ● Separate Ways ● Open Host Service ● Published Language
  • 16. Shared Kernel Two teams share a subset of the domain model including code and maybe the database. Teams involved must collaborate, any change in a kernel model must be done only in consultation with the other team. Payroll context employee Employee Management context Em oy o l
  • 17. Customer / Supplier A Customer/Supplier or Consumer-Driven Contract relationship is where the downstream context defines the contract that they want the upstream context to provide. The two domains can still evolve independently, as long as the upstream context fulfills its obligations under the contract. The downstream team, considered as the customer, sometimes has veto rights. Team 1 Team 2
  • 18. Conformist The downstream team conforms to the model of the upstream team. There is no translation of models and not vetoing. If the upstream model is a mess, it propagates to the downstream model. Team 1 Team 2 bar foo bar foo
  • 19. Anticorruption Layer A layer that isolates a client's model from another's system model by translation. Team 1 Team 2 bar foo cat zoo ACL
  • 20. Separate Ways There is no connection between the bounded contexts of a system. This allows teams to find their own solutions in their domain. Team 1 Team 2 pig zoo cat zoo
  • 21. Open Host Service Each Bounded Context offers a defined set of services that expose functionality for other systems. Any downstream system can then implement their own integration. This is especially useful for integration requirements with many other systems. Team 1 Team 2 OHS
  • 22. Published Language Similar to OHS. However it goes as far as to model a Domain as a common language between bounded contexts. Team 1 Team 2 PL Language
  • 23. Context Map - Examples
  • 24. Context Map - Examples
  • 25. Communication between Bounded Contexts ● Interfaces beetween modules (monolith) ● RPC with SOAP ● REST ● Using Events
  • 26. Transfering data between Bounded Contexts
  • 27. References ● Domain-Driven Design. Eric Evans (2003). ● Domain-Driven Design Distilled. Vaughn Vernon (2016). ● Implementing Domain Driven Design. Vaughn Vernon (2013). ● The Anatomy Of Domain-Driven Design. Scott Millett and Samuel Knight. ● Domain Modeling Made Functional. Scott Wlashchin (2018).