SlideShare a Scribd company logo
A gentle introduction
to domain-driven
design
Eleonora Ciceri - 12 January 2022
1
The rationale: why domain-driven? (1)
Communication issues in projects are often the cause for project failures
These issues can manifest themselves in different ways:
- unclear requirements
- uncertain project goals
- ineffective coordination
- ineffective effort
2
The rationale: why domain-driven? (2)
Domain-driven design (in short, DDD) focuses on effective communication:
What do we gain? Guide decisions according to the business strategy
3
DDD strategic tools
Analyze business domain and strategy to foster a
shared understanding of the business between
stakeholders
DDD tactical tools
Write code in a way that reflects the business
domain, addresses its goals and speaks the
language of the business
Analyzing a business domain
4
What is a business domain?
A business domain defines a company’s main area of activity
5
“sells coffee” “provides
courier delivery”
What is a subdomain?
A subdomain is a fine-grained area of business activity
The subdomain have to interact with each other to achieve the company’s
goal in its business domain
6
business domain
(some) subdomains
buy real
estate
hire
personnel
manage
finances
sell coffee
divides into
Core subdomain
A core subdomain is what a company does differently from its competitors
- inventing new products or services
- reducing costs by optimizing existing processes
7
Uber
Ridesharing
Jewelry maker
Jewelry design
Google
Ranking algorithm
Generic subdomain
A generic subdomain is a business activity that all companies perform in the
same way
- do not provide competitive advantage
- no need for innovation or optimization (use what is available!)
8
Jewelry maker
Online shop
Uber
Authc/z
Supporting domain
A supporting domain supports the company’s business without providing
competitive advantage
9
Online advertising company
Storing and indexing creative
materials (banners, landing
pages…)
Comparing subdomains
10
Solution strategy
All subdomains are required for the business domain to work!
11
Core subdomain Generic subdomain
Supporting
subdomain
has to be implemented in-house
(if adopted from someone else, it would undermine
the notion of competitive advantage, as the
company’s competitors would be able to do the same
thing we do)
cost-effective to buy as off-the-shelf
product or adopt an open-source
solution
(hard but already solved problems)
a rapid application development
framework will suffice to implement the
business logic without introducing
complexity
(do not require elaborate design patterns)
How do we identify subdomains?
Start from the company’s departments and other organizational units. Then,
investigate inner workings and see if a department is composed of
finer-grained components
12
Identifying the domain experts
13
Who are the domain experts?
Domain experts are subject matter experts who know the business that we
are going to model and implement in code
The software is supposed to solve their problems
14
What they are
- knowledge authorities in the business
domain
- people coming up with requirements
- end users
What they are NOT
- analysts gathering requirements
- engineers designing the system
Discovering domain knowledge:
Ubiquitous language
15
Business problems
The software systems we build are solutions to business problems, both at
business domain and subdomain
16
business domain/subdomains
courier delivery
knowledge management
clearing subdomain
accounting subdomain
business problems
ship packages in limited time frame
optimize information storage/retrieval
optimize the execution of financial transactions
optimize the shipping process
Traditional SW development lifecycle: flaws
17
interviews conducted by analysts, without
engineers, sometimes without domain experts
written documents that
become outdated
wrong or distorted
understanding of problem and
requirements
wrong solution, or right solution
to the wrong problem
A chain of translations
distills the wrong
domain knowledge and
leads to the wrong
software
Knowledge discovery
To design a software solution, we have to grasp and distill the basic
knowledge of the business domain
18
the knowledge belongs to
domain experts
it is their job to understand the intricacies
of the business domain
we are not domain experts
it is NOT our job to understand the
intricacies of the business domain
The software has to mimic the
domain experts’ way of thinking
about the problem
Without an understanding of the
business problem and the reasoning
behind the requirements, our
solution may fail to describe a
business concept
Knowledge discovery needs the proper language
To grasp and distill the basic knowledge of the business domain, the parties
involved need to speak the same language
- we do not have to make up the language
- we need to use the actual, existing language of the domain
19
Ubiquitous language
Using a ubiquitous language is the cornerstone practice of domain-driven
design
Idea: if parties need to communicate efficiently, instead of relying on
translations, they have to speak the same language
20
software
engineer
product
owner
domain
expert
UI/UX
designer
All should use the
ubiquitous language
when describing the
business domain
No technical jargon!
21
“the order can be published only if it has at
least one associated record in the customer
table”
“the advertisement iframe displays an HTML
file”
“we acquire real-time data using a sensor”
Formulate statements in the language of business
22
“an advertising campaign can display different
creative materials”
“an order can be placed only if at least one of
the contained items is available”
“sales commissions are accounted for after
transactions are approved”
Language consistency: ambiguous terms
Ambiguity hinders communication, so each term of the ubiquitous language
should have one and only one meaning
If a term is ambiguous, replace it with something that is not
23
policy
regulatory rule
insurance contract
Language consistency: synonymous terms
Two terms cannot be used interchangeably in a ubiquitous language, e.g.,
user, visitor, administrator, account…
Often these synonyms denotes different concepts, e.g.,
- “visitor” may be used only for analysis purposes in a website, as he is not
registered
- “account” actually uses the system and its functionality
24
Discovering domain knowledge:
Model of the business domain
25
What is a model?
“A model is a simplified representation of thing or phenomenon that intentionally
emphasizes certain aspects while ignoring others”
– Rebecca Wirfs-Brock
A model is NOT a copy of the real world; it is a human construct that helps us
make sense of real-world systems
26
Canonical example: a map is a model
that does not represent all the details of
our planet, but contains enough data to
support its particular purpose, i.e., the
problem it is supposed to solve
Effective modeling
All models have a purpose, and an effective model contains only the details
needed to fulfill its purpose
Just omit unnecessary details and leave only what is needed for solving the
problem at hand
27
there are no subway stops
on world maps
you cannot use a subway
may to estimate distances
Modeling the business domain
The business domain model is supposed to:
- capture the domain experts’ mental models (i.e., their thought
processes about how the business works to implement its function)
- include just enough aspects of the business domain to make it possible
to implement the required system
28
When solving the arrhythmia detection
problem we shall model ECG signals…
… not the heart vessels!
Modeling is a continuous effort
The ubiquitous language should be continuously reinforced throughout the
project. All the following should use this language:
- requirements
- tests
- documentation
- source code
Cultivation of a ubiquitous language is an ongoing process. Everyday use of
the language will reveal deeper insights into the business domain
29
Tools for managing the ubiquitous language
30
glossary
It maintains nouns (names of entities, processes, roles etc.)
It has to be maintained by all team members, not just by
architects and team leaders!
tests
Tests in Gherkin language can capture the ubiquitous
language but also to describe behavior (business logic, its
rules, assumptions, invariants)
Managing domain complexity
31
Context is what gives words a meaning
Some words have different meanings depending on the context in which they
are used
32
Squeezing diversified knowledge into the model
Suppose we have two experts who do not agree on the ubiquitous language:
Seems like we are mixing domain concepts from different contexts. This is
why we have to introduce bounded contexts
33
Expert from marketing department
“a lead is a notification that somebody
is interested in one product”
Expert from sales department
“a lead represents the entire lifecycle of
the sales process”
Bounded contexts
The solution in domain-driven design is trivial:
divide the ubiquitous language into multiple (smaller) languages, then assign
each one to the explicit context in which it can be applied
The contexts in which we apply these smaller languages are called bounded
contexts
34
A ubiquitous language in
one bounded context can
be completely irrelevant
to the scope of another
bounded context
Bounded contexts vs Subdomains
35
Subdomain
A subdomain resembles a set of interrelated use cases
Use cases are defined by:
- business domain
- system requirements
We do NOT define the requirements, that is the
responsibility of business
Bounded context
A bounded context is designed (and choosing its
boundaries is a strategic design decision)
We decide here how to divide the business domain into
smaller, manageable problem domains
Relationship between subdomain and bounded context:
- Having a one-to-one relationship between bounded contexts and subdomains can be
reasonable in some scenarios
- In other scenarios, different decomposition strategies can be more suitable: it could be
beneficial to use multiple models of the same concept to solve different problems
A practical example: model for a refrigerator (1)
This is a model of a refrigerator:
No, it’s not a refrigerator, but it models the refrigerator without copying the
real-world entity. It has a purpose – a problem it is supposed to solve
36
A practical example: model for a refrigerator (2)
The problem it solves is checking whether the refrigerator can fit through the
kitchen door
The cardboard does not look like the fridge, but building a 3D model would
not solve the problem more efficiently than the cardboard. Thus, building a 3D
would be called overengineering
37
A practical example: model for a refrigerator (3)
The cardboard model, though, cannot check if the height of the refrigerator is
adequate.
We need a second model for the same fridge:
Each model has its bounded context (the cardboard verifying that the base
makes through the entry, the tape measure verifying that it is not too tall)
38
Integrating bounded contexts
39
Contracts between bounded contexts
Bounded contexts themselves are not independent
- a system may be built of components
- components have to interact with one another to achieve the system’s
overarching goal
There are touchpoints between bounded contexts, called contracts or
integration patterns
40
Integration patterns: Cooperation
Cooperation patterns relate to bounded contexts implemented by teams with
well-established communication or by a single team
Partnership. Each team develops its own
bounded context, integration is done
collaboratively
Shared kernel. The same (sub-)model is
implemented in multiple bounded contexts. It
introduces dependencies between contexts: it has
to be applied only when the cost of duplicating code
is higher than the cost of coordination
41
Integration patterns: Customer-Supplier (1)
Customer-supplier patterns have a service provider (upstream) and a
consumer (downstream) that interact
Here teams are independent, and in most cases we have an imbalance of
power: either the upstream or the downstream team dictate the integration
contract
42
Integration patterns: Customer-Supplier (2)
Conformist. If the upstream does not have
motivation to support the downstream needs, it
defines the integration contract, defined according
to its own model. If the downstream accepts the
contract, it is called conformist.
Anti-corruption layer. The upstream service has still
the power of the relationship. However, the
downstream is not willing to conform. Thus, it will
translate the upstream bounded model into a model
tailored to its own needs. The anti-corruption layer
performs the translation, so that the downstream is
isolated from foreign concepts
43
Integration patterns: Customer-Supplier (3)
Open-Host Service. Here the upstream wants to
provide the consumer the best service possible. The
upstream decouples the implementation model from
the public interface: it implements its model, but offers
a public protocol that is convenient for the consumer
(also called the published language)
It is also possible to create multiple versions of the published
language, to serve different downstream applications or to
allow the downstream to migrate to new versions gradually
44
Integration patterns: Separate ways
The last collaboration option is not collaborate at all, e.g., there are teams
unwilling to collaborate:
- Communication issues: when teams have a hard time collaborating, it is
more cost-effective to go separate ways and duplicate functionalities in
multiple bounded contexts
- Generic subdomains: if the subdomain is generic it is more cost-effective
to integrate it locally in each bounded context (e.g., logging: one of the
contexts expose it as a service and the other use it)
45
Context maps
46
Context map
A context map is a visual representation of the system’s bounded contexts
and the integrations between them
47
Why using context maps?
For many purposes:
- High-level design: a context map provides an overview of the system’s
components and its models
- Communication patterns: a context map depicts the communication
patterns among teams, e.g., which teams are collaborating and which
prefer less intimate integration patterns
- Organizational issues: a context map can give insight into organizational
issues. E.g., what does it mean if the consumers for a certain upstream
team all resort to implementing an ACL?
- Documentation: sharing the effort of updating the context map over
different teams helps in building a shared documentation
48
References
49
References
[1] Vlad Khononov, Learning Domain-Driven Design - Aligning Software
Architecture and Business Strategy, O’Reilly, 2022
50

More Related Content

What's hot

A Practical Guide to Domain Driven Design: Presentation Slides
A Practical Guide to Domain Driven Design: Presentation SlidesA Practical Guide to Domain Driven Design: Presentation Slides
A Practical Guide to Domain Driven Design: Presentation Slides
thinkddd
 
Domain driven design and model driven development
Domain driven design and model driven developmentDomain driven design and model driven development
Domain driven design and model driven development
Dmitry Geyzersky
 
Refactoring for Domain Driven Design
Refactoring for Domain Driven DesignRefactoring for Domain Driven Design
Refactoring for Domain Driven Design
David Berliner
 
DevDay2017 ESGI Essential DDD
DevDay2017 ESGI Essential DDDDevDay2017 ESGI Essential DDD
DevDay2017 ESGI Essential DDD
Gregory Boissinot
 
Domain Driven Design Tactical Patterns
Domain Driven Design Tactical PatternsDomain Driven Design Tactical Patterns
Domain Driven Design Tactical Patterns
Robert Alexe
 
Introduction to DDD
Introduction to DDDIntroduction to DDD
Introduction to DDD
Eduards Sizovs
 
Domain-Driven Design
Domain-Driven DesignDomain-Driven Design
Domain-Driven Design
Andriy Buday
 
Domain Driven Design Demonstrated
Domain Driven Design Demonstrated Domain Driven Design Demonstrated
Domain Driven Design Demonstrated
Alan Christensen
 
Domain driven design
Domain driven designDomain driven design
Domain driven design
Amit Mukherjee
 
DDD Strategic Design - Context Maps - Paulo Clavijo - April 2018
DDD Strategic Design - Context Maps - Paulo Clavijo - April 2018DDD Strategic Design - Context Maps - Paulo Clavijo - April 2018
DDD Strategic Design - Context Maps - Paulo Clavijo - April 2018
Paulo Clavijo
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
Hannah Farrugia
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
Araf Karsh Hamid
 
How to Implement Domain Driven Design in Real Life SDLC
How to Implement Domain Driven Design  in Real Life SDLCHow to Implement Domain Driven Design  in Real Life SDLC
How to Implement Domain Driven Design in Real Life SDLC
Abdul Karim
 
Domain Driven Design and Hexagonal Architecture
Domain Driven Design and Hexagonal ArchitectureDomain Driven Design and Hexagonal Architecture
Domain Driven Design and Hexagonal Architecture
Crishantha Nanayakkara
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
Nader Albert
 
DDD Strategic Patterns and Microservices by Example
DDD Strategic Patterns and Microservices by ExampleDDD Strategic Patterns and Microservices by Example
DDD Strategic Patterns and Microservices by Example
Erik Ashepa
 
Domain Driven Design (DDD)
Domain Driven Design (DDD)Domain Driven Design (DDD)
Domain Driven Design (DDD)
Tom Kocjan
 
Domain driven design
Domain driven designDomain driven design
Domain driven design
Mustafa Dağdelen
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
Harsh Jegadeesan
 
Deconstructing Monoliths with Domain Driven Design
Deconstructing Monoliths with Domain Driven DesignDeconstructing Monoliths with Domain Driven Design
Deconstructing Monoliths with Domain Driven Design
VMware Tanzu
 

What's hot (20)

A Practical Guide to Domain Driven Design: Presentation Slides
A Practical Guide to Domain Driven Design: Presentation SlidesA Practical Guide to Domain Driven Design: Presentation Slides
A Practical Guide to Domain Driven Design: Presentation Slides
 
Domain driven design and model driven development
Domain driven design and model driven developmentDomain driven design and model driven development
Domain driven design and model driven development
 
Refactoring for Domain Driven Design
Refactoring for Domain Driven DesignRefactoring for Domain Driven Design
Refactoring for Domain Driven Design
 
DevDay2017 ESGI Essential DDD
DevDay2017 ESGI Essential DDDDevDay2017 ESGI Essential DDD
DevDay2017 ESGI Essential DDD
 
Domain Driven Design Tactical Patterns
Domain Driven Design Tactical PatternsDomain Driven Design Tactical Patterns
Domain Driven Design Tactical Patterns
 
Introduction to DDD
Introduction to DDDIntroduction to DDD
Introduction to DDD
 
Domain-Driven Design
Domain-Driven DesignDomain-Driven Design
Domain-Driven Design
 
Domain Driven Design Demonstrated
Domain Driven Design Demonstrated Domain Driven Design Demonstrated
Domain Driven Design Demonstrated
 
Domain driven design
Domain driven designDomain driven design
Domain driven design
 
DDD Strategic Design - Context Maps - Paulo Clavijo - April 2018
DDD Strategic Design - Context Maps - Paulo Clavijo - April 2018DDD Strategic Design - Context Maps - Paulo Clavijo - April 2018
DDD Strategic Design - Context Maps - Paulo Clavijo - April 2018
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
How to Implement Domain Driven Design in Real Life SDLC
How to Implement Domain Driven Design  in Real Life SDLCHow to Implement Domain Driven Design  in Real Life SDLC
How to Implement Domain Driven Design in Real Life SDLC
 
Domain Driven Design and Hexagonal Architecture
Domain Driven Design and Hexagonal ArchitectureDomain Driven Design and Hexagonal Architecture
Domain Driven Design and Hexagonal Architecture
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
DDD Strategic Patterns and Microservices by Example
DDD Strategic Patterns and Microservices by ExampleDDD Strategic Patterns and Microservices by Example
DDD Strategic Patterns and Microservices by Example
 
Domain Driven Design (DDD)
Domain Driven Design (DDD)Domain Driven Design (DDD)
Domain Driven Design (DDD)
 
Domain driven design
Domain driven designDomain driven design
Domain driven design
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Deconstructing Monoliths with Domain Driven Design
Deconstructing Monoliths with Domain Driven DesignDeconstructing Monoliths with Domain Driven Design
Deconstructing Monoliths with Domain Driven Design
 

Similar to DDD - 1 - A gentle introduction to Domain Driven Design.pdf

Domain Driven Design Introduction
Domain Driven Design IntroductionDomain Driven Design Introduction
Domain Driven Design Introduction
wojtek_s
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
Mojammel Haque
 
Domain Driven Design: Made Easy employing Systemic Approach
Domain Driven Design: Made Easy employing Systemic ApproachDomain Driven Design: Made Easy employing Systemic Approach
Domain Driven Design: Made Easy employing Systemic Approach
Panagiotis Papaioannou
 
Domain Drive Design: A Very Short Introduction for Business People
Domain Drive Design: A Very Short Introduction for Business PeopleDomain Drive Design: A Very Short Introduction for Business People
Domain Drive Design: A Very Short Introduction for Business People
Emre Sevinç
 
DDD
DDDDDD
Adopting Domain-Driven Design in your organization
Adopting Domain-Driven Design in your organizationAdopting Domain-Driven Design in your organization
Adopting Domain-Driven Design in your organization
Aleix Morgadas
 
Domain Driven Design: Made Easy employing Systemic Approach
Domain Driven Design: Made Easy employing Systemic ApproachDomain Driven Design: Made Easy employing Systemic Approach
Domain Driven Design: Made Easy employing Systemic Approach
Panagiotis Papaioannou
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
Muhammad Ali
 
DDD knowledge sharing
DDD knowledge sharingDDD knowledge sharing
DDD knowledge sharing
Md. Sadhan Sarker
 
SE2_Lec 19_Design Principles and Design Patterns
SE2_Lec 19_Design Principles and Design PatternsSE2_Lec 19_Design Principles and Design Patterns
SE2_Lec 19_Design Principles and Design Patterns
Amr E. Mohamed
 
DDD In Agile
DDD In Agile   DDD In Agile
DDD In Agile
Skills Matter
 
DOMAIN DRIVER DESIGN
DOMAIN DRIVER DESIGNDOMAIN DRIVER DESIGN
DOMAIN DRIVER DESIGN
Mohammed Fazuluddin
 
Code & Cannoli - Domain Driven Design
Code & Cannoli - Domain Driven DesignCode & Cannoli - Domain Driven Design
Code & Cannoli - Domain Driven Design
Frank Levering
 
Excavating the knowledge of our ancestors
Excavating the knowledge of our ancestorsExcavating the knowledge of our ancestors
Excavating the knowledge of our ancestors
Uwe Friedrichsen
 
Domain Driven Design in an Agile World
Domain Driven Design in an Agile WorldDomain Driven Design in an Agile World
Domain Driven Design in an Agile World
Lorraine Steyn
 
Sioux Hot-or-Not: Model Driven Software Development (Markus Voelter)
Sioux Hot-or-Not: Model Driven Software Development (Markus Voelter)Sioux Hot-or-Not: Model Driven Software Development (Markus Voelter)
Sioux Hot-or-Not: Model Driven Software Development (Markus Voelter)
siouxhotornot
 
DDD eXchange
DDD eXchangeDDD eXchange
DDD eXchange
Skills Matter
 
Domain-Driven Design (Artur Trosin Product Stream)
Domain-Driven Design (Artur Trosin Product Stream)Domain-Driven Design (Artur Trosin Product Stream)
Domain-Driven Design (Artur Trosin Product Stream)
IT Arena
 
Architectural Thinking @ Domain Driven Design Meetup Vienna Feb 2019
Architectural Thinking @ Domain Driven Design Meetup Vienna Feb 2019Architectural Thinking @ Domain Driven Design Meetup Vienna Feb 2019
Architectural Thinking @ Domain Driven Design Meetup Vienna Feb 2019
Wolfgang Göbl
 
Business analysis interview question and answers
Business analysis interview question and answersBusiness analysis interview question and answers
Business analysis interview question and answers
Garuda Trainings
 

Similar to DDD - 1 - A gentle introduction to Domain Driven Design.pdf (20)

Domain Driven Design Introduction
Domain Driven Design IntroductionDomain Driven Design Introduction
Domain Driven Design Introduction
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Domain Driven Design: Made Easy employing Systemic Approach
Domain Driven Design: Made Easy employing Systemic ApproachDomain Driven Design: Made Easy employing Systemic Approach
Domain Driven Design: Made Easy employing Systemic Approach
 
Domain Drive Design: A Very Short Introduction for Business People
Domain Drive Design: A Very Short Introduction for Business PeopleDomain Drive Design: A Very Short Introduction for Business People
Domain Drive Design: A Very Short Introduction for Business People
 
DDD
DDDDDD
DDD
 
Adopting Domain-Driven Design in your organization
Adopting Domain-Driven Design in your organizationAdopting Domain-Driven Design in your organization
Adopting Domain-Driven Design in your organization
 
Domain Driven Design: Made Easy employing Systemic Approach
Domain Driven Design: Made Easy employing Systemic ApproachDomain Driven Design: Made Easy employing Systemic Approach
Domain Driven Design: Made Easy employing Systemic Approach
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
DDD knowledge sharing
DDD knowledge sharingDDD knowledge sharing
DDD knowledge sharing
 
SE2_Lec 19_Design Principles and Design Patterns
SE2_Lec 19_Design Principles and Design PatternsSE2_Lec 19_Design Principles and Design Patterns
SE2_Lec 19_Design Principles and Design Patterns
 
DDD In Agile
DDD In Agile   DDD In Agile
DDD In Agile
 
DOMAIN DRIVER DESIGN
DOMAIN DRIVER DESIGNDOMAIN DRIVER DESIGN
DOMAIN DRIVER DESIGN
 
Code & Cannoli - Domain Driven Design
Code & Cannoli - Domain Driven DesignCode & Cannoli - Domain Driven Design
Code & Cannoli - Domain Driven Design
 
Excavating the knowledge of our ancestors
Excavating the knowledge of our ancestorsExcavating the knowledge of our ancestors
Excavating the knowledge of our ancestors
 
Domain Driven Design in an Agile World
Domain Driven Design in an Agile WorldDomain Driven Design in an Agile World
Domain Driven Design in an Agile World
 
Sioux Hot-or-Not: Model Driven Software Development (Markus Voelter)
Sioux Hot-or-Not: Model Driven Software Development (Markus Voelter)Sioux Hot-or-Not: Model Driven Software Development (Markus Voelter)
Sioux Hot-or-Not: Model Driven Software Development (Markus Voelter)
 
DDD eXchange
DDD eXchangeDDD eXchange
DDD eXchange
 
Domain-Driven Design (Artur Trosin Product Stream)
Domain-Driven Design (Artur Trosin Product Stream)Domain-Driven Design (Artur Trosin Product Stream)
Domain-Driven Design (Artur Trosin Product Stream)
 
Architectural Thinking @ Domain Driven Design Meetup Vienna Feb 2019
Architectural Thinking @ Domain Driven Design Meetup Vienna Feb 2019Architectural Thinking @ Domain Driven Design Meetup Vienna Feb 2019
Architectural Thinking @ Domain Driven Design Meetup Vienna Feb 2019
 
Business analysis interview question and answers
Business analysis interview question and answersBusiness analysis interview question and answers
Business analysis interview question and answers
 

More from Eleonora Ciceri

Artificial Intelligence: an introduction.pdf
Artificial Intelligence: an introduction.pdfArtificial Intelligence: an introduction.pdf
Artificial Intelligence: an introduction.pdf
Eleonora Ciceri
 
Sorting algorithms
Sorting algorithmsSorting algorithms
Sorting algorithms
Eleonora Ciceri
 
Trees
TreesTrees
Linked lists - Exercises
Linked lists - ExercisesLinked lists - Exercises
Linked lists - Exercises
Eleonora Ciceri
 
Doubly Linked Lists
Doubly Linked ListsDoubly Linked Lists
Doubly Linked Lists
Eleonora Ciceri
 
Linked lists
Linked listsLinked lists
Linked lists
Eleonora Ciceri
 
AJAX - An introduction
AJAX - An introductionAJAX - An introduction
AJAX - An introduction
Eleonora Ciceri
 
Java Server Pages
Java Server PagesJava Server Pages
Java Server Pages
Eleonora Ciceri
 
JDBC in Servlets
JDBC in ServletsJDBC in Servlets
JDBC in Servlets
Eleonora Ciceri
 
Client side scripting
Client side scriptingClient side scripting
Client side scripting
Eleonora Ciceri
 
HTML5 - An introduction
HTML5 - An introductionHTML5 - An introduction
HTML5 - An introduction
Eleonora Ciceri
 
Dynamic content generation
Dynamic content generationDynamic content generation
Dynamic content generation
Eleonora Ciceri
 
Multimedia Information Retrieval and User Behavior
Multimedia Information Retrieval and User BehaviorMultimedia Information Retrieval and User Behavior
Multimedia Information Retrieval and User Behavior
Eleonora Ciceri
 
The CrowdSearch framework
The CrowdSearch frameworkThe CrowdSearch framework
The CrowdSearch framework
Eleonora Ciceri
 

More from Eleonora Ciceri (14)

Artificial Intelligence: an introduction.pdf
Artificial Intelligence: an introduction.pdfArtificial Intelligence: an introduction.pdf
Artificial Intelligence: an introduction.pdf
 
Sorting algorithms
Sorting algorithmsSorting algorithms
Sorting algorithms
 
Trees
TreesTrees
Trees
 
Linked lists - Exercises
Linked lists - ExercisesLinked lists - Exercises
Linked lists - Exercises
 
Doubly Linked Lists
Doubly Linked ListsDoubly Linked Lists
Doubly Linked Lists
 
Linked lists
Linked listsLinked lists
Linked lists
 
AJAX - An introduction
AJAX - An introductionAJAX - An introduction
AJAX - An introduction
 
Java Server Pages
Java Server PagesJava Server Pages
Java Server Pages
 
JDBC in Servlets
JDBC in ServletsJDBC in Servlets
JDBC in Servlets
 
Client side scripting
Client side scriptingClient side scripting
Client side scripting
 
HTML5 - An introduction
HTML5 - An introductionHTML5 - An introduction
HTML5 - An introduction
 
Dynamic content generation
Dynamic content generationDynamic content generation
Dynamic content generation
 
Multimedia Information Retrieval and User Behavior
Multimedia Information Retrieval and User BehaviorMultimedia Information Retrieval and User Behavior
Multimedia Information Retrieval and User Behavior
 
The CrowdSearch framework
The CrowdSearch frameworkThe CrowdSearch framework
The CrowdSearch framework
 

Recently uploaded

22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURSCompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
RamonNovais6
 
Applications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdfApplications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdf
Atif Razi
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
IJECEIAES
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
Prakhyath Rai
 
artificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptxartificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptx
GauravCar
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 
Design and optimization of ion propulsion drone
Design and optimization of ion propulsion droneDesign and optimization of ion propulsion drone
Design and optimization of ion propulsion drone
bjmsejournal
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
co23btech11018
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
MDSABBIROJJAMANPAYEL
 
BRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdfBRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdf
LAXMAREDDY22
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Sinan KOZAK
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
IJECEIAES
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
abbyasa1014
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
KrishnaveniKrishnara1
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
171ticu
 
Data Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason WebinarData Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason Webinar
UReason
 
cnn.pptx Convolutional neural network used for image classication
cnn.pptx Convolutional neural network used for image classicationcnn.pptx Convolutional neural network used for image classication
cnn.pptx Convolutional neural network used for image classication
SakkaravarthiShanmug
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
171ticu
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
21UME003TUSHARDEB
 

Recently uploaded (20)

22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURSCompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
 
Applications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdfApplications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdf
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
 
artificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptxartificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptx
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 
Design and optimization of ion propulsion drone
Design and optimization of ion propulsion droneDesign and optimization of ion propulsion drone
Design and optimization of ion propulsion drone
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
 
BRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdfBRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdf
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
 
Data Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason WebinarData Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason Webinar
 
cnn.pptx Convolutional neural network used for image classication
cnn.pptx Convolutional neural network used for image classicationcnn.pptx Convolutional neural network used for image classication
cnn.pptx Convolutional neural network used for image classication
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
 

DDD - 1 - A gentle introduction to Domain Driven Design.pdf

  • 1. A gentle introduction to domain-driven design Eleonora Ciceri - 12 January 2022 1
  • 2. The rationale: why domain-driven? (1) Communication issues in projects are often the cause for project failures These issues can manifest themselves in different ways: - unclear requirements - uncertain project goals - ineffective coordination - ineffective effort 2
  • 3. The rationale: why domain-driven? (2) Domain-driven design (in short, DDD) focuses on effective communication: What do we gain? Guide decisions according to the business strategy 3 DDD strategic tools Analyze business domain and strategy to foster a shared understanding of the business between stakeholders DDD tactical tools Write code in a way that reflects the business domain, addresses its goals and speaks the language of the business
  • 5. What is a business domain? A business domain defines a company’s main area of activity 5 “sells coffee” “provides courier delivery”
  • 6. What is a subdomain? A subdomain is a fine-grained area of business activity The subdomain have to interact with each other to achieve the company’s goal in its business domain 6 business domain (some) subdomains buy real estate hire personnel manage finances sell coffee divides into
  • 7. Core subdomain A core subdomain is what a company does differently from its competitors - inventing new products or services - reducing costs by optimizing existing processes 7 Uber Ridesharing Jewelry maker Jewelry design Google Ranking algorithm
  • 8. Generic subdomain A generic subdomain is a business activity that all companies perform in the same way - do not provide competitive advantage - no need for innovation or optimization (use what is available!) 8 Jewelry maker Online shop Uber Authc/z
  • 9. Supporting domain A supporting domain supports the company’s business without providing competitive advantage 9 Online advertising company Storing and indexing creative materials (banners, landing pages…)
  • 11. Solution strategy All subdomains are required for the business domain to work! 11 Core subdomain Generic subdomain Supporting subdomain has to be implemented in-house (if adopted from someone else, it would undermine the notion of competitive advantage, as the company’s competitors would be able to do the same thing we do) cost-effective to buy as off-the-shelf product or adopt an open-source solution (hard but already solved problems) a rapid application development framework will suffice to implement the business logic without introducing complexity (do not require elaborate design patterns)
  • 12. How do we identify subdomains? Start from the company’s departments and other organizational units. Then, investigate inner workings and see if a department is composed of finer-grained components 12
  • 14. Who are the domain experts? Domain experts are subject matter experts who know the business that we are going to model and implement in code The software is supposed to solve their problems 14 What they are - knowledge authorities in the business domain - people coming up with requirements - end users What they are NOT - analysts gathering requirements - engineers designing the system
  • 16. Business problems The software systems we build are solutions to business problems, both at business domain and subdomain 16 business domain/subdomains courier delivery knowledge management clearing subdomain accounting subdomain business problems ship packages in limited time frame optimize information storage/retrieval optimize the execution of financial transactions optimize the shipping process
  • 17. Traditional SW development lifecycle: flaws 17 interviews conducted by analysts, without engineers, sometimes without domain experts written documents that become outdated wrong or distorted understanding of problem and requirements wrong solution, or right solution to the wrong problem A chain of translations distills the wrong domain knowledge and leads to the wrong software
  • 18. Knowledge discovery To design a software solution, we have to grasp and distill the basic knowledge of the business domain 18 the knowledge belongs to domain experts it is their job to understand the intricacies of the business domain we are not domain experts it is NOT our job to understand the intricacies of the business domain The software has to mimic the domain experts’ way of thinking about the problem Without an understanding of the business problem and the reasoning behind the requirements, our solution may fail to describe a business concept
  • 19. Knowledge discovery needs the proper language To grasp and distill the basic knowledge of the business domain, the parties involved need to speak the same language - we do not have to make up the language - we need to use the actual, existing language of the domain 19
  • 20. Ubiquitous language Using a ubiquitous language is the cornerstone practice of domain-driven design Idea: if parties need to communicate efficiently, instead of relying on translations, they have to speak the same language 20 software engineer product owner domain expert UI/UX designer All should use the ubiquitous language when describing the business domain
  • 21. No technical jargon! 21 “the order can be published only if it has at least one associated record in the customer table” “the advertisement iframe displays an HTML file” “we acquire real-time data using a sensor”
  • 22. Formulate statements in the language of business 22 “an advertising campaign can display different creative materials” “an order can be placed only if at least one of the contained items is available” “sales commissions are accounted for after transactions are approved”
  • 23. Language consistency: ambiguous terms Ambiguity hinders communication, so each term of the ubiquitous language should have one and only one meaning If a term is ambiguous, replace it with something that is not 23 policy regulatory rule insurance contract
  • 24. Language consistency: synonymous terms Two terms cannot be used interchangeably in a ubiquitous language, e.g., user, visitor, administrator, account… Often these synonyms denotes different concepts, e.g., - “visitor” may be used only for analysis purposes in a website, as he is not registered - “account” actually uses the system and its functionality 24
  • 25. Discovering domain knowledge: Model of the business domain 25
  • 26. What is a model? “A model is a simplified representation of thing or phenomenon that intentionally emphasizes certain aspects while ignoring others” – Rebecca Wirfs-Brock A model is NOT a copy of the real world; it is a human construct that helps us make sense of real-world systems 26 Canonical example: a map is a model that does not represent all the details of our planet, but contains enough data to support its particular purpose, i.e., the problem it is supposed to solve
  • 27. Effective modeling All models have a purpose, and an effective model contains only the details needed to fulfill its purpose Just omit unnecessary details and leave only what is needed for solving the problem at hand 27 there are no subway stops on world maps you cannot use a subway may to estimate distances
  • 28. Modeling the business domain The business domain model is supposed to: - capture the domain experts’ mental models (i.e., their thought processes about how the business works to implement its function) - include just enough aspects of the business domain to make it possible to implement the required system 28 When solving the arrhythmia detection problem we shall model ECG signals… … not the heart vessels!
  • 29. Modeling is a continuous effort The ubiquitous language should be continuously reinforced throughout the project. All the following should use this language: - requirements - tests - documentation - source code Cultivation of a ubiquitous language is an ongoing process. Everyday use of the language will reveal deeper insights into the business domain 29
  • 30. Tools for managing the ubiquitous language 30 glossary It maintains nouns (names of entities, processes, roles etc.) It has to be maintained by all team members, not just by architects and team leaders! tests Tests in Gherkin language can capture the ubiquitous language but also to describe behavior (business logic, its rules, assumptions, invariants)
  • 32. Context is what gives words a meaning Some words have different meanings depending on the context in which they are used 32
  • 33. Squeezing diversified knowledge into the model Suppose we have two experts who do not agree on the ubiquitous language: Seems like we are mixing domain concepts from different contexts. This is why we have to introduce bounded contexts 33 Expert from marketing department “a lead is a notification that somebody is interested in one product” Expert from sales department “a lead represents the entire lifecycle of the sales process”
  • 34. Bounded contexts The solution in domain-driven design is trivial: divide the ubiquitous language into multiple (smaller) languages, then assign each one to the explicit context in which it can be applied The contexts in which we apply these smaller languages are called bounded contexts 34 A ubiquitous language in one bounded context can be completely irrelevant to the scope of another bounded context
  • 35. Bounded contexts vs Subdomains 35 Subdomain A subdomain resembles a set of interrelated use cases Use cases are defined by: - business domain - system requirements We do NOT define the requirements, that is the responsibility of business Bounded context A bounded context is designed (and choosing its boundaries is a strategic design decision) We decide here how to divide the business domain into smaller, manageable problem domains Relationship between subdomain and bounded context: - Having a one-to-one relationship between bounded contexts and subdomains can be reasonable in some scenarios - In other scenarios, different decomposition strategies can be more suitable: it could be beneficial to use multiple models of the same concept to solve different problems
  • 36. A practical example: model for a refrigerator (1) This is a model of a refrigerator: No, it’s not a refrigerator, but it models the refrigerator without copying the real-world entity. It has a purpose – a problem it is supposed to solve 36
  • 37. A practical example: model for a refrigerator (2) The problem it solves is checking whether the refrigerator can fit through the kitchen door The cardboard does not look like the fridge, but building a 3D model would not solve the problem more efficiently than the cardboard. Thus, building a 3D would be called overengineering 37
  • 38. A practical example: model for a refrigerator (3) The cardboard model, though, cannot check if the height of the refrigerator is adequate. We need a second model for the same fridge: Each model has its bounded context (the cardboard verifying that the base makes through the entry, the tape measure verifying that it is not too tall) 38
  • 40. Contracts between bounded contexts Bounded contexts themselves are not independent - a system may be built of components - components have to interact with one another to achieve the system’s overarching goal There are touchpoints between bounded contexts, called contracts or integration patterns 40
  • 41. Integration patterns: Cooperation Cooperation patterns relate to bounded contexts implemented by teams with well-established communication or by a single team Partnership. Each team develops its own bounded context, integration is done collaboratively Shared kernel. The same (sub-)model is implemented in multiple bounded contexts. It introduces dependencies between contexts: it has to be applied only when the cost of duplicating code is higher than the cost of coordination 41
  • 42. Integration patterns: Customer-Supplier (1) Customer-supplier patterns have a service provider (upstream) and a consumer (downstream) that interact Here teams are independent, and in most cases we have an imbalance of power: either the upstream or the downstream team dictate the integration contract 42
  • 43. Integration patterns: Customer-Supplier (2) Conformist. If the upstream does not have motivation to support the downstream needs, it defines the integration contract, defined according to its own model. If the downstream accepts the contract, it is called conformist. Anti-corruption layer. The upstream service has still the power of the relationship. However, the downstream is not willing to conform. Thus, it will translate the upstream bounded model into a model tailored to its own needs. The anti-corruption layer performs the translation, so that the downstream is isolated from foreign concepts 43
  • 44. Integration patterns: Customer-Supplier (3) Open-Host Service. Here the upstream wants to provide the consumer the best service possible. The upstream decouples the implementation model from the public interface: it implements its model, but offers a public protocol that is convenient for the consumer (also called the published language) It is also possible to create multiple versions of the published language, to serve different downstream applications or to allow the downstream to migrate to new versions gradually 44
  • 45. Integration patterns: Separate ways The last collaboration option is not collaborate at all, e.g., there are teams unwilling to collaborate: - Communication issues: when teams have a hard time collaborating, it is more cost-effective to go separate ways and duplicate functionalities in multiple bounded contexts - Generic subdomains: if the subdomain is generic it is more cost-effective to integrate it locally in each bounded context (e.g., logging: one of the contexts expose it as a service and the other use it) 45
  • 47. Context map A context map is a visual representation of the system’s bounded contexts and the integrations between them 47
  • 48. Why using context maps? For many purposes: - High-level design: a context map provides an overview of the system’s components and its models - Communication patterns: a context map depicts the communication patterns among teams, e.g., which teams are collaborating and which prefer less intimate integration patterns - Organizational issues: a context map can give insight into organizational issues. E.g., what does it mean if the consumers for a certain upstream team all resort to implementing an ACL? - Documentation: sharing the effort of updating the context map over different teams helps in building a shared documentation 48
  • 50. References [1] Vlad Khononov, Learning Domain-Driven Design - Aligning Software Architecture and Business Strategy, O’Reilly, 2022 50