SlideShare a Scribd company logo
1 of 74
Download to read offline




Introduction to Domain Driven
Design
Frank Levering
• PHP Developer
• DevMob
Quality software
• Writing tests
• Using design patterns
• Manual testing
• SOLID
Quality software doesn’t give
an insurance for a quality
software model
Code example
Date - Name
It saves a customer no
matter what, awesome right?
This model is suffering from
Anemia
We have no idea under what
business situations this
method is used
And it even gets worse
Code example
Date - Name
Can we really test this?
DDD helps you creating a
more high-quality software
model
It helps you create software
that makes sense to the
business
You would be making software that
is as close as possible to what the
business leaders and experts would
create if they were the developers
Disclaimer
• A domain is not DNS or
anything internet related
• Domain is the area your
business relies
So how does DDD work?
• Strategic design
• Tactical design
We will mostly be talking
about strategic design today
Key concepts of strategic design
• Domain experts
• Ubiquitous language
• Core Domains, Subdomains
and Domain Models
• Bounded Contexts
Not doing any strategic
design results in doing DDD-
Lite
Domain experts
Bringing domain experts and
developers to the same playing
field which produces software
that makes sense to the business
Introducing Ubiquitous
language
It’s not the language of the
business
It must not adopt industry
standard terminology
It’s also not the language
used by domain experts
It’s a shared language
developed by a team, a team
composed of both domain
experts and developers
Ubiquitous language
develops on the way
No translations between the
domain experts, software
developers and the software
Date - Name
Ubiquitous language is
important when designing
the behaviour of objects
Code example
Date - Name
Code example
Date - Name
This was kind of an extreme
example
Code example
Date - Name
Code example
Date - Name
Domains
A domain, in the broad
sense, is what an
organisation does
But the term domain is a bit
overloaded
So let’s use Core Domain
and Subdomains
The whole Domain of the
organisation is composed of
Subdomains
Retailer example
Date - Name
But what is the Core
Domain?
Generic vs Supporting
Subdomains
Why is this so important?
Developers like to focus on
the technical part of a
product
We focus on Entities, Value
Objects, Services,
Aggregates
By doing that, we blend core
concepts with generic ones
Causing the creation of two
models into one
Date - Name
Agile PM tool example
Date - Name
Focus on Core Domain
The Domain is your problem
space
Domain Model
What is the Domain Model?
The Domain Model is your organised
and structured knowledge of the problem.
• It should represent the
vocabulary and key concepts
of the problem domain
• It should identify the
relationships among all of the
entities
It could be a diagram
Or written documentation
But in our case..
It’s a software model of the very
specific domain you are working in
It should be accessible and
understandable by everyone
involved in the project
Bounded Contexts
Bounded Context is an
explicit boundary in which a
domain model exists
The boundary is created because
each of the model’s concepts
inside, with its properties and
operations, has a special meaning
Example with Bounded
Contexts
Date - Name
Inside a Subdomain, you can
have multiple Bounded
Contexts
A Bounded Context should be
as big as it needs to be in order
to fully express its complete
Ubiquitous Language
Concepts that are not truly
part of the domain should be
factored out
Naming a Bounded Context
So why should you do DDD?
Bringing domain experts and
developers to the same playing
field which produces software
that makes sense to the business
You would be making software that
is as close as possible to what the
business leaders and experts would
create if they were the developers
Learning more about the
business, both domain
experts and developers
No translations between the
domain experts, software
developers and the software
Centralizing knowledge is
key
Thank you

More Related Content

What's hot

Domain Driven Design Mat Holroyd
Domain Driven Design   Mat HolroydDomain Driven Design   Mat Holroyd
Domain Driven Design Mat Holroyd
melbournepatterns
 

What's hot (15)

Domain Driven Design Quickly
Domain Driven Design QuicklyDomain Driven Design Quickly
Domain Driven Design Quickly
 
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
 
Refactoring for Domain Driven Design
Refactoring for Domain Driven DesignRefactoring for Domain Driven Design
Refactoring for Domain Driven Design
 
DDD Basics: Bounded Contexts, Modelling - Kortrijk Edition
DDD Basics: Bounded Contexts, Modelling - Kortrijk EditionDDD Basics: Bounded Contexts, Modelling - Kortrijk Edition
DDD Basics: Bounded Contexts, Modelling - Kortrijk Edition
 
Domain-Driven Design
Domain-Driven DesignDomain-Driven Design
Domain-Driven Design
 
Domain-Driven Design: The "What" and the "Why"
Domain-Driven Design: The "What" and the "Why"Domain-Driven Design: The "What" and the "Why"
Domain-Driven Design: The "What" and the "Why"
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Domain Driven Design Mat Holroyd
Domain Driven Design   Mat HolroydDomain Driven Design   Mat Holroyd
Domain Driven Design Mat Holroyd
 
Domain Driven Design - Building Blocks
Domain Driven Design - Building BlocksDomain Driven Design - Building Blocks
Domain Driven Design - Building Blocks
 
Domain Driven Design & Hexagonal Architecture
Domain Driven Design & Hexagonal ArchitectureDomain Driven Design & Hexagonal Architecture
Domain Driven Design & Hexagonal Architecture
 
Domain Driven Design - Distillation - Chapter 15
Domain Driven Design - Distillation - Chapter 15Domain Driven Design - Distillation - Chapter 15
Domain Driven Design - Distillation - Chapter 15
 
Domain Driven Design Big Picture Strategic Patterns
Domain Driven Design Big Picture Strategic PatternsDomain Driven Design Big Picture Strategic Patterns
Domain Driven Design Big Picture Strategic Patterns
 
Domain Driven Design and Model Driven Software Development
Domain Driven Design and Model Driven Software DevelopmentDomain Driven Design and Model Driven Software Development
Domain Driven Design and Model Driven Software Development
 
Domain Driven Design Communication Techniques
Domain Driven Design Communication TechniquesDomain Driven Design Communication Techniques
Domain Driven Design Communication Techniques
 
Domain Driven Design - garajco Education 2017
Domain Driven Design - garajco Education 2017Domain Driven Design - garajco Education 2017
Domain Driven Design - garajco Education 2017
 

Viewers also liked

Why Domain-Driven Design Matters
Why Domain-Driven Design MattersWhy Domain-Driven Design Matters
Why Domain-Driven Design Matters
Mathias Verraes
 
Domain-Driven Design at ZendCon 2012
Domain-Driven Design at ZendCon 2012Domain-Driven Design at ZendCon 2012
Domain-Driven Design at ZendCon 2012
Bradley Holt
 
S.O.L.I.D. - Павел Кохан, Python Meetup 26.09.2014
S.O.L.I.D. - Павел Кохан, Python Meetup 26.09.2014S.O.L.I.D. - Павел Кохан, Python Meetup 26.09.2014
S.O.L.I.D. - Павел Кохан, Python Meetup 26.09.2014
Python Meetup
 
ZCA: A component architecture for Python
ZCA: A component architecture for PythonZCA: A component architecture for Python
ZCA: A component architecture for Python
Timo Stollenwerk
 

Viewers also liked (20)

Domain Driven Design 101
Domain Driven Design 101Domain Driven Design 101
Domain Driven Design 101
 
Domain-driven design
Domain-driven designDomain-driven design
Domain-driven design
 
Domain Driven Design and Hexagonal Architecture with Rails
Domain Driven Design and Hexagonal Architecture with RailsDomain Driven Design and Hexagonal Architecture with Rails
Domain Driven Design and Hexagonal Architecture with Rails
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Why Domain-Driven Design Matters
Why Domain-Driven Design MattersWhy Domain-Driven Design Matters
Why Domain-Driven Design Matters
 
Domain Driven Design with the F# type System -- F#unctional Londoners 2014
Domain Driven Design with the F# type System -- F#unctional Londoners 2014Domain Driven Design with the F# type System -- F#unctional Londoners 2014
Domain Driven Design with the F# type System -- F#unctional Londoners 2014
 
Domain-Driven Design at ZendCon 2012
Domain-Driven Design at ZendCon 2012Domain-Driven Design at ZendCon 2012
Domain-Driven Design at ZendCon 2012
 
Singleton Object Management
Singleton Object ManagementSingleton Object Management
Singleton Object Management
 
An Introduction to Domain Driven Design for Product Managers
An Introduction to Domain Driven Design for Product ManagersAn Introduction to Domain Driven Design for Product Managers
An Introduction to Domain Driven Design for Product Managers
 
Agile development and domain driven design
Agile development and domain driven designAgile development and domain driven design
Agile development and domain driven design
 
Introduction to Domain Driven Design
Introduction to Domain Driven DesignIntroduction to Domain Driven Design
Introduction to Domain Driven Design
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Driven Development - Closing the Loop on Scrum
Driven Development - Closing the Loop on ScrumDriven Development - Closing the Loop on Scrum
Driven Development - Closing the Loop on Scrum
 
Package and distribute your Python code
Package and distribute your Python codePackage and distribute your Python code
Package and distribute your Python code
 
Sofware Fora de Séria 2016 - Implementando realtime no frontend
Sofware Fora de Séria 2016 - Implementando realtime no frontendSofware Fora de Séria 2016 - Implementando realtime no frontend
Sofware Fora de Séria 2016 - Implementando realtime no frontend
 
Introduction to Design Patterns and Singleton
Introduction to Design Patterns and SingletonIntroduction to Design Patterns and Singleton
Introduction to Design Patterns and Singleton
 
PATTERNS04 - Structural Design Patterns
PATTERNS04 - Structural Design PatternsPATTERNS04 - Structural Design Patterns
PATTERNS04 - Structural Design Patterns
 
S.O.L.I.D. - Павел Кохан, Python Meetup 26.09.2014
S.O.L.I.D. - Павел Кохан, Python Meetup 26.09.2014S.O.L.I.D. - Павел Кохан, Python Meetup 26.09.2014
S.O.L.I.D. - Павел Кохан, Python Meetup 26.09.2014
 
Como DDD e Strategic Design estão nos ajudando a modernizar um Legado
Como DDD e Strategic Design estão nos ajudando a modernizar um LegadoComo DDD e Strategic Design estão nos ajudando a modernizar um Legado
Como DDD e Strategic Design estão nos ajudando a modernizar um Legado
 
ZCA: A component architecture for Python
ZCA: A component architecture for PythonZCA: A component architecture for Python
ZCA: A component architecture for Python
 

Similar to Code & Cannoli - Domain Driven Design

Similar to Code & Cannoli - Domain Driven Design (20)

Domain Driven Design Introduction
Domain Driven Design IntroductionDomain Driven Design Introduction
Domain Driven Design Introduction
 
DOMAIN DRIVER DESIGN
DOMAIN DRIVER DESIGNDOMAIN DRIVER DESIGN
DOMAIN DRIVER DESIGN
 
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)
 
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
 
Model Driven Architectures
Model Driven ArchitecturesModel Driven Architectures
Model Driven Architectures
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
DDD
DDDDDD
DDD
 
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
 
Schibsted Spain - Day 1 - DDD Course
Schibsted Spain - Day 1 - DDD CourseSchibsted Spain - Day 1 - DDD Course
Schibsted Spain - Day 1 - DDD Course
 
Topic tdd-and-bdd b4usolution
Topic tdd-and-bdd b4usolutionTopic tdd-and-bdd b4usolution
Topic tdd-and-bdd b4usolution
 
How to become a great developer
How to become a great developerHow to become a great developer
How to become a great developer
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
DDD In Agile
DDD In Agile   DDD In Agile
DDD In Agile
 
SOAT Agile Day 2017 DDD
SOAT Agile Day 2017 DDDSOAT Agile Day 2017 DDD
SOAT Agile Day 2017 DDD
 
Design system for new O2 CRM and web apps
Design system for new O2 CRM and web appsDesign system for new O2 CRM and web apps
Design system for new O2 CRM and web apps
 
Up to speed in domain driven design
Up to speed in domain driven designUp to speed in domain driven design
Up to speed in domain driven design
 
BDD presentation
BDD presentationBDD presentation
BDD presentation
 
How to become a Software Engineer Carrier Path for Software Developer
How to become a Software Engineer Carrier Path for Software DeveloperHow to become a Software Engineer Carrier Path for Software Developer
How to become a Software Engineer Carrier Path for Software Developer
 
Delivering Fantastic Brand Experiences With Low-Code
Delivering Fantastic Brand Experiences With Low-CodeDelivering Fantastic Brand Experiences With Low-Code
Delivering Fantastic Brand Experiences With Low-Code
 
10 Things You Should Know About MDD
10 Things You Should Know About MDD10 Things You Should Know About MDD
10 Things You Should Know About MDD
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

Code & Cannoli - Domain Driven Design