SlideShare a Scribd company logo
A Quick Introduction
to Domain-Driven Design
Tackling the Complexity at the Heart of Software
Rafael Azevedo
Software Development is Challenging!
• People / Organisa5onal Challenges
• Technology Challenges
• Design Challenges
Intricacies, uncertain<es, complexi<es!!!
Introduction to Domain Driven Design
“Divide et Impera”
Philip II of Macedon 382–336 BC
Julius Caesar 100–44 BC
Napoléon Bonaparte 1769–1821
Introduction to Domain Driven Design
Divide and Conquer Approaches
Introduction to Domain Driven Design
https://jpattonassociates.com/dont_know_what_i_want
Increments
Itera5ons
Introduction to Domain Driven Design
“The beginning of wisdom is the
definition of terms.”
Socrates (470 – 399 B.C.)
Introduction to Domain Driven Design
Domains and Models
A domain is sphere of knowledge, influence, or activity.
A model is a selectively simplified and consciously structured system of
abstractions that describes selected aspects of a domain and can be
used to solve problems related to that domain.
An appropriate model makes sense of information on a domain
and focuses it on a problem.
Introduction to Domain Driven Design
Context and Language
Context is the seHng in which a word or statement appears that
determines its meaning. Statements about a model can only be
understood in a context.
Bounded Context is a descrip5on of a boundary within which a
par5cular model is defined and applicable.
Ubiquitous Language is a language structured around the domain
model and used by all team members within a bounded context to
connect all the ac5vi5es of the team with the soKware.
Introduction to Domain Driven Design
Putting the Domain Model to Work
1. The domain model is distilled knowledge.
2. The domain model and the heart of the design
shape each other.
3. The domain model is the backbone of a language
used by all team members.
Introduction to Domain Driven Design
The DDD Approach to Software Development
1. Focus on the core domain.
2. Explore models in a creative collaboration of
domain practitioners and software practitioners.
3. Cultivate a ubiquitous language
within an explicitly bounded context.
Introduction to Domain Driven Design
Some DDD Building Blocks
Introduction to Domain Driven Design
Value Objects
Value Objects describe or compute
some characteristic of a thing.
Introduction to Domain Driven Design
Entities and Aggregates
An entity represents a thread of continuity and identity,
going through a lifecycle.
An aggregate is a cluster of value objects and its root entity
that defines a boundary of consistency.
Introduction to Domain Driven Design
Domain Events
Domain Events provide a discrete representation
of relevant facts or changes in the state of entities.
• Activity in a domain is modelled as a series of domain events.
• In a distributed system, the state of an entity can be inferred from the
domain events currently known to a particular node, allowing a
coherent model in the absence of full information about the system
as a whole.
Introduction to Domain Driven Design
Does it really matter?
Introduction to Domain Driven Design
Mars Climate Orbiter Spacecraft
On September 23, 1999 NASA lost this $125 million spacecraft after
a 286-day journey to Mars.
Introduction to Domain Driven Design
What is wrong with this code?
def upward_thrust(Float target_position, Float actual_position)
Float deviation = actual_position.vertical - target_position.vertical
Float correction = calculate_vertical_thrust_adjustment(deviation)
return correction
end
Introduction to Domain Driven Design
Is this better?
interest_rate = InterestRate.new(3.5, :percentage, :annually)
interest_period = Period.new(Date.new(2018, 1, 1), Date.new(2018, 1, 9))
principal = Amount.new(300.00, 'AUD’)
interest = interest_rate.apply(principal, interest_period)
Introduction to Domain Driven Design
DDD in our tool set
Introduction to Domain Driven Design
When and Where should we use DDD?
Domain Problem
X
Technical Problem
Introduction to Domain Driven Design
When and Where should we use DDD?
ü Complicated
=> benefits from clarity and precision
ü Innovative
=> demands continuous learning and change
ü High Value
=> affords longer term investment
Introduction to Domain Driven Design
When and Where should we use DDD?
High commitment
for intense & continued collaboration
between domain practitioners
and software practitioners
Introduc5on to Domain Driven Design
Wrapping-Up
• DDD primarily addresses complexity in the domain, through
evolving design models that foster learning, clarity and preciseness.
• DDD engages domain and software experts in deep collaboration,
based on intentional language and explicit bounded contexts.
• DDD provides a pattern language for software design;
we covered value objects, entities/aggregates, commands/events.
• DDD is a tool, best suited
• for high value, complex/complicated, innovative domain problems;
• for organisations highly committed to consistent and effective collaboration.
Introduction to Domain Driven Design
Introduction to Domain Driven Design
Actually, there is so much more!
Introduction to Domain Driven Design
Ralph Johnson
“Eric Evans has wriien a fantas5c book on how you can make the
design of your soKware match your mental model of the problem
domain you are addressing.”
. . .
“The book is a fun read. Eric has lots of interes5ng stories, and he has a
way with words. I see this book as essen5al reading for soKware
developers—it is a future classic.”

More Related Content

PDF
Code & Cannoli - Domain Driven Design
PPTX
Domain Driven Design - DDDSydney 2011
PPTX
Domain driven design
PDF
Introduction to Domain Driven Design
PDF
Domain-Driven Design Basics
PDF
DDD Basics: Bounded Contexts, Modelling - Kortrijk Edition
PPTX
How to Implement Domain Driven Design in Real Life SDLC
PPTX
A Practical Guide to Domain Driven Design: Presentation Slides
Code & Cannoli - Domain Driven Design
Domain Driven Design - DDDSydney 2011
Domain driven design
Introduction to Domain Driven Design
Domain-Driven Design Basics
DDD Basics: Bounded Contexts, Modelling - Kortrijk Edition
How to Implement Domain Driven Design in Real Life SDLC
A Practical Guide to Domain Driven Design: Presentation Slides

What's hot (13)

PPTX
Domain driven design
PPTX
Domain Driven Design in an Agile World
PDF
Domain-Driven Design
PDF
Domain-Driven Design (Artur Trosin Product Stream)
KEY
ZendCon 2011 UnCon Domain-Driven Design
PPT
Domain Driven Design Demonstrated
PPTX
Domain Driven Design: Zero to Hero
PPTX
Domain Driven Design Introduction
PDF
DevDay2017 ESGI Essential DDD
PDF
Modelling a complex domain with Domain-Driven Design
PPTX
Domain Driven Design Quickly
PDF
Strategic Domain-Driven Design by Nick Tune at #AgileIndia2019
PPTX
Domain Driven Design
Domain driven design
Domain Driven Design in an Agile World
Domain-Driven Design
Domain-Driven Design (Artur Trosin Product Stream)
ZendCon 2011 UnCon Domain-Driven Design
Domain Driven Design Demonstrated
Domain Driven Design: Zero to Hero
Domain Driven Design Introduction
DevDay2017 ESGI Essential DDD
Modelling a complex domain with Domain-Driven Design
Domain Driven Design Quickly
Strategic Domain-Driven Design by Nick Tune at #AgileIndia2019
Domain Driven Design
Ad

Similar to Introduction to Domain-Driven Design (20)

PDF
Domain Driven Design: Made Easy employing Systemic Approach
PPTX
DDD In Agile
PDF
Domain Driven Design
PPTX
DOMAIN DRIVER DESIGN
PPTX
DDD eXchange
PPTX
Up to speed in domain driven design
PPTX
Domain Driven Design
PPTX
Domain driven design simplified
PDF
Domain Driven Design - Building Blocks
PDF
Domain Driven Design: Made Easy employing Systemic Approach
PPTX
The Role of the Software Architect
PPT
Domain Driven Design (DDD)
PPTX
Domain Driven Design
PPT
EricEvans_StrategicDesign.ppt
PDF
Idiomatic Domain Driven Design: implementing CQRS
PPTX
Understanding and Addressing Architectural Challenges of Cloud- Based Systems
PPTX
Arch CoP - Domain Driven Design.pptx
PDF
D2 domain driven-design
PDF
Domain Driven Design - Distillation - Chapter 15
PDF
Domain Driven Design Big Picture Strategic Patterns
Domain Driven Design: Made Easy employing Systemic Approach
DDD In Agile
Domain Driven Design
DOMAIN DRIVER DESIGN
DDD eXchange
Up to speed in domain driven design
Domain Driven Design
Domain driven design simplified
Domain Driven Design - Building Blocks
Domain Driven Design: Made Easy employing Systemic Approach
The Role of the Software Architect
Domain Driven Design (DDD)
Domain Driven Design
EricEvans_StrategicDesign.ppt
Idiomatic Domain Driven Design: implementing CQRS
Understanding and Addressing Architectural Challenges of Cloud- Based Systems
Arch CoP - Domain Driven Design.pptx
D2 domain driven-design
Domain Driven Design - Distillation - Chapter 15
Domain Driven Design Big Picture Strategic Patterns
Ad

Recently uploaded (20)

PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
medical staffing services at VALiNTRY
PDF
Understanding Forklifts - TECH EHS Solution
PDF
AI in Product Development-omnex systems
PPTX
L1 - Introduction to python Backend.pptx
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPT
Introduction Database Management System for Course Database
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
Odoo POS Development Services by CandidRoot Solutions
PPTX
Introduction to Artificial Intelligence
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Nekopoi APK 2025 free lastest update
Design an Analysis of Algorithms II-SECS-1021-03
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
medical staffing services at VALiNTRY
Understanding Forklifts - TECH EHS Solution
AI in Product Development-omnex systems
L1 - Introduction to python Backend.pptx
Wondershare Filmora 15 Crack With Activation Key [2025
ManageIQ - Sprint 268 Review - Slide Deck
ISO 45001 Occupational Health and Safety Management System
How to Choose the Right IT Partner for Your Business in Malaysia
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Odoo Companies in India – Driving Business Transformation.pdf
Introduction Database Management System for Course Database
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Odoo POS Development Services by CandidRoot Solutions
Introduction to Artificial Intelligence
2025 Textile ERP Trends: SAP, Odoo & Oracle
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Nekopoi APK 2025 free lastest update

Introduction to Domain-Driven Design

  • 1. A Quick Introduction to Domain-Driven Design Tackling the Complexity at the Heart of Software Rafael Azevedo
  • 2. Software Development is Challenging! • People / Organisa5onal Challenges • Technology Challenges • Design Challenges Intricacies, uncertain<es, complexi<es!!! Introduction to Domain Driven Design
  • 3. “Divide et Impera” Philip II of Macedon 382–336 BC Julius Caesar 100–44 BC Napoléon Bonaparte 1769–1821 Introduction to Domain Driven Design
  • 4. Divide and Conquer Approaches Introduction to Domain Driven Design https://jpattonassociates.com/dont_know_what_i_want Increments Itera5ons
  • 5. Introduction to Domain Driven Design
  • 6. “The beginning of wisdom is the definition of terms.” Socrates (470 – 399 B.C.) Introduction to Domain Driven Design
  • 7. Domains and Models A domain is sphere of knowledge, influence, or activity. A model is a selectively simplified and consciously structured system of abstractions that describes selected aspects of a domain and can be used to solve problems related to that domain. An appropriate model makes sense of information on a domain and focuses it on a problem. Introduction to Domain Driven Design
  • 8. Context and Language Context is the seHng in which a word or statement appears that determines its meaning. Statements about a model can only be understood in a context. Bounded Context is a descrip5on of a boundary within which a par5cular model is defined and applicable. Ubiquitous Language is a language structured around the domain model and used by all team members within a bounded context to connect all the ac5vi5es of the team with the soKware. Introduction to Domain Driven Design
  • 9. Putting the Domain Model to Work 1. The domain model is distilled knowledge. 2. The domain model and the heart of the design shape each other. 3. The domain model is the backbone of a language used by all team members. Introduction to Domain Driven Design
  • 10. The DDD Approach to Software Development 1. Focus on the core domain. 2. Explore models in a creative collaboration of domain practitioners and software practitioners. 3. Cultivate a ubiquitous language within an explicitly bounded context. Introduction to Domain Driven Design
  • 11. Some DDD Building Blocks Introduction to Domain Driven Design
  • 12. Value Objects Value Objects describe or compute some characteristic of a thing. Introduction to Domain Driven Design
  • 13. Entities and Aggregates An entity represents a thread of continuity and identity, going through a lifecycle. An aggregate is a cluster of value objects and its root entity that defines a boundary of consistency. Introduction to Domain Driven Design
  • 14. Domain Events Domain Events provide a discrete representation of relevant facts or changes in the state of entities. • Activity in a domain is modelled as a series of domain events. • In a distributed system, the state of an entity can be inferred from the domain events currently known to a particular node, allowing a coherent model in the absence of full information about the system as a whole. Introduction to Domain Driven Design
  • 15. Does it really matter? Introduction to Domain Driven Design
  • 16. Mars Climate Orbiter Spacecraft On September 23, 1999 NASA lost this $125 million spacecraft after a 286-day journey to Mars. Introduction to Domain Driven Design
  • 17. What is wrong with this code? def upward_thrust(Float target_position, Float actual_position) Float deviation = actual_position.vertical - target_position.vertical Float correction = calculate_vertical_thrust_adjustment(deviation) return correction end Introduction to Domain Driven Design
  • 18. Is this better? interest_rate = InterestRate.new(3.5, :percentage, :annually) interest_period = Period.new(Date.new(2018, 1, 1), Date.new(2018, 1, 9)) principal = Amount.new(300.00, 'AUD’) interest = interest_rate.apply(principal, interest_period) Introduction to Domain Driven Design
  • 19. DDD in our tool set Introduction to Domain Driven Design
  • 20. When and Where should we use DDD? Domain Problem X Technical Problem Introduction to Domain Driven Design
  • 21. When and Where should we use DDD? ü Complicated => benefits from clarity and precision ü Innovative => demands continuous learning and change ü High Value => affords longer term investment Introduction to Domain Driven Design
  • 22. When and Where should we use DDD? High commitment for intense & continued collaboration between domain practitioners and software practitioners Introduc5on to Domain Driven Design
  • 23. Wrapping-Up • DDD primarily addresses complexity in the domain, through evolving design models that foster learning, clarity and preciseness. • DDD engages domain and software experts in deep collaboration, based on intentional language and explicit bounded contexts. • DDD provides a pattern language for software design; we covered value objects, entities/aggregates, commands/events. • DDD is a tool, best suited • for high value, complex/complicated, innovative domain problems; • for organisations highly committed to consistent and effective collaboration. Introduction to Domain Driven Design
  • 24. Introduction to Domain Driven Design
  • 25. Actually, there is so much more! Introduction to Domain Driven Design Ralph Johnson “Eric Evans has wriien a fantas5c book on how you can make the design of your soKware match your mental model of the problem domain you are addressing.” . . . “The book is a fun read. Eric has lots of interes5ng stories, and he has a way with words. I see this book as essen5al reading for soKware developers—it is a future classic.”