DDD: lessons learned

DDD Lessons
Domain modelling lessons that I wish I’d learned earlier
Who am I?
Lead Developer and Solutions Architect
Writing PHP web apps professionally for 12 yrs
Recovered Architecture Astronaut
A little DDD and EventSourcing obsessed (I will talk for hours)
Organiser of PHPDublin @barryosull
barry@tercet.io
http://barryosull.com
Lesson 1
Recognising Domain Experts
Recognising Domain Experts
? ? ?
? ? ? ?
Solution Expert Domain Expert
Lesson 2
The UI is not a proxy for a Domain Expert
The UI is not a proxy for a domain expert
Developer
How
does “X”
work?
Lesson 3
When interviewing Domain Experts,
refine the constraints they define
When Interviewing Domain Experts, refine defined constraints
? ? ?
? ? ? ?
Domain ExpertDeveloper
What
happens
if X?
Well,
then it
should . .
...
...
Lesson 4
Sub Domains and Bounded Contexts
are VERY different things
Domains and SubDomains are composable
Domain: Running a Travel Agency
We want to create and sell trips to customers
SubDomain: TripBuilding
Building trips is expensive
SubDomain: Searching
Searching across all the services
(flight/hotel/car/etc..) is time
consuming and error prone
SubDomain: Booking
Booking trips is time consuming
SubDomain: Finance
We don't know how effective we are
at turning quotes into bookings
SubSubDomain: Tracking
We don't keep track of what we've
quoted
SubSubDomain: Reporting
We have no way of aggregating
this information
Bounded Contexts are independent
Trip
Building
IAM
CRM Reporting
Searching
Lesson 5
Domains and contexts do not always align
Unaligned sub domains and bounded contexts
Payroll Accounting
Payroll
Accounts
Manager
HR Reporting
Accounting
Payroll
Other Lessons that I don’t have time
to explore
Ohh lightning talks, there’s never enough time
Other lessons
6: Temporal constraints are far more costly to implement than Value constraints
7. Constant refactoring is key to understanding a domain
8: Hold event storming sessions, even if you're not event sourcing
9: Applying DDD works and it makes you a better developer
10: If it's not your core domain, don't build it yourself, use an existing solution
Thank you
Any questions?
(Please leave feedback on the meetup page!)
1 of 16

Recommended

Introduction to C# - Week 0 by
Introduction to C# - Week 0Introduction to C# - Week 0
Introduction to C# - Week 0Jamshid Hashimi
1.1K views22 slides
How to become a domain expert in no time? by
How to become a domain expert in no time?How to become a domain expert in no time?
How to become a domain expert in no time?Yvan PHELIZOT
117 views40 slides
Domain Driven Design in an Agile World by
Domain Driven Design in an Agile WorldDomain Driven Design in an Agile World
Domain Driven Design in an Agile WorldLorraine Steyn
4.2K views22 slides
Brownfield Domain Driven Design by
Brownfield Domain Driven DesignBrownfield Domain Driven Design
Brownfield Domain Driven DesignNicolò Pignatelli
3.5K views42 slides
Enterprise TypeScript by
Enterprise TypeScriptEnterprise TypeScript
Enterprise TypeScriptJeremy Likness
6.1K views14 slides
ASSIGNMENT 1 FRONT SHEET by
ASSIGNMENT 1 FRONT SHEETASSIGNMENT 1 FRONT SHEET
ASSIGNMENT 1 FRONT SHEETMonica Waters
9 views15 slides

More Related Content

Similar to DDD: lessons learned

Adopting Domain-Driven Design in your organization by
Adopting Domain-Driven Design in your organizationAdopting Domain-Driven Design in your organization
Adopting Domain-Driven Design in your organizationAleix Morgadas
701 views35 slides
Up to speed in domain driven design by
Up to speed in domain driven designUp to speed in domain driven design
Up to speed in domain driven designRick van der Arend
1.9K views33 slides
Fast & Furious Responsive Design in Chrome DevTools by
Fast & Furious Responsive Design in Chrome  DevToolsFast & Furious Responsive Design in Chrome  DevTools
Fast & Furious Responsive Design in Chrome DevToolsTony Jessup
1.8K views69 slides
Code & Cannoli - Domain Driven Design by
Code & Cannoli - Domain Driven DesignCode & Cannoli - Domain Driven Design
Code & Cannoli - Domain Driven DesignFrank Levering
472 views74 slides
Domain Driven Design by
Domain Driven DesignDomain Driven Design
Domain Driven DesignMojammel Haque
149 views74 slides
DITA and Localization: Bringing the Best Together by
DITA and Localization: Bringing the Best TogetherDITA and Localization: Bringing the Best Together
DITA and Localization: Bringing the Best TogetherLavaCon
346 views34 slides

Similar to DDD: lessons learned(20)

Adopting Domain-Driven Design in your organization by Aleix Morgadas
Adopting Domain-Driven Design in your organizationAdopting Domain-Driven Design in your organization
Adopting Domain-Driven Design in your organization
Aleix Morgadas701 views
Fast & Furious Responsive Design in Chrome DevTools by Tony Jessup
Fast & Furious Responsive Design in Chrome  DevToolsFast & Furious Responsive Design in Chrome  DevTools
Fast & Furious Responsive Design in Chrome DevTools
Tony Jessup1.8K views
Code & Cannoli - Domain Driven Design by Frank Levering
Code & Cannoli - Domain Driven DesignCode & Cannoli - Domain Driven Design
Code & Cannoli - Domain Driven Design
Frank Levering472 views
DITA and Localization: Bringing the Best Together by LavaCon
DITA and Localization: Bringing the Best TogetherDITA and Localization: Bringing the Best Together
DITA and Localization: Bringing the Best Together
LavaCon346 views
AD303: Extreme Makeover – IBM® Lotus® Domino® Application Edition by Ray Bilyk
AD303: Extreme Makeover – IBM® Lotus® Domino® Application EditionAD303: Extreme Makeover – IBM® Lotus® Domino® Application Edition
AD303: Extreme Makeover – IBM® Lotus® Domino® Application Edition
Ray Bilyk533 views
Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Code... by Cyrille Martraire
Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Code...Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Code...
Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Code...
Cyrille Martraire1.8K views
How to Implement Domain Driven Design in Real Life SDLC by Abdul Karim
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 Karim3.3K views
Dynamic C# and a New World of Possibilities by Chicago ALT.NET
Dynamic C# and a New World of PossibilitiesDynamic C# and a New World of Possibilities
Dynamic C# and a New World of Possibilities
Chicago ALT.NET730 views
This isn't what you think it is by Joel Cochran
This isn't what you think it isThis isn't what you think it is
This isn't what you think it is
Joel Cochran671 views
Fcc1219 by Thinkful
Fcc1219Fcc1219
Fcc1219
Thinkful82 views
Frontend Development vs Backend Development | Detailed Comparison by Mariya James
Frontend Development vs Backend Development | Detailed ComparisonFrontend Development vs Backend Development | Detailed Comparison
Frontend Development vs Backend Development | Detailed Comparison
Mariya James109 views
apidays LIVE Australia 2021 - Designing Embedded Platforms by Jeremy Glassenb... by apidays
apidays LIVE Australia 2021 - Designing Embedded Platforms by Jeremy Glassenb...apidays LIVE Australia 2021 - Designing Embedded Platforms by Jeremy Glassenb...
apidays LIVE Australia 2021 - Designing Embedded Platforms by Jeremy Glassenb...
apidays37 views
Domain Drive Design: A Very Short Introduction for Business People by Emre Sevinç
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ç101 views
How to become a great developer by Netcetera
How to become a great developerHow to become a great developer
How to become a great developer
Netcetera1.4K views
Spark: Authoring Experience++ in Drupal 7, 8, and Beyond by Angela Byron
Spark: Authoring Experience++ in Drupal 7, 8, and BeyondSpark: Authoring Experience++ in Drupal 7, 8, and Beyond
Spark: Authoring Experience++ in Drupal 7, 8, and Beyond
Angela Byron2.6K views
Architecting For Ux by Josh Holmes
Architecting For UxArchitecting For Ux
Architecting For Ux
Josh Holmes1.8K views
How to hire flutter developers? A simple yet comprehensive guide by SnehaDas60
How to hire flutter developers? A simple yet comprehensive guideHow to hire flutter developers? A simple yet comprehensive guide
How to hire flutter developers? A simple yet comprehensive guide
SnehaDas6012 views

More from Barry O Sullivan

Value objects by
Value objectsValue objects
Value objectsBarry O Sullivan
261 views14 slides
Building a blog with an Onion Architecture by
Building a blog with an Onion ArchitectureBuilding a blog with an Onion Architecture
Building a blog with an Onion ArchitectureBarry O Sullivan
253 views23 slides
Managing expectations by
Managing expectationsManaging expectations
Managing expectationsBarry O Sullivan
232 views23 slides
Php test fest by
Php test festPhp test fest
Php test festBarry O Sullivan
1.6K views27 slides
Cleaning up your codebase with a clean architecture by
Cleaning up your codebase with a clean architectureCleaning up your codebase with a clean architecture
Cleaning up your codebase with a clean architectureBarry O Sullivan
574 views31 slides
Design patterns - The Good, the Bad, and the Anti-Pattern by
Design patterns -  The Good, the Bad, and the Anti-PatternDesign patterns -  The Good, the Bad, and the Anti-Pattern
Design patterns - The Good, the Bad, and the Anti-PatternBarry O Sullivan
1.2K views37 slides

More from Barry O Sullivan(6)

Recently uploaded

GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... by
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...James Anderson
85 views32 slides
The details of description: Techniques, tips, and tangents on alternative tex... by
The details of description: Techniques, tips, and tangents on alternative tex...The details of description: Techniques, tips, and tangents on alternative tex...
The details of description: Techniques, tips, and tangents on alternative tex...BookNet Canada
127 views24 slides
Igniting Next Level Productivity with AI-Infused Data Integration Workflows by
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Safe Software
263 views86 slides
Unit 1_Lecture 2_Physical Design of IoT.pdf by
Unit 1_Lecture 2_Physical Design of IoT.pdfUnit 1_Lecture 2_Physical Design of IoT.pdf
Unit 1_Lecture 2_Physical Design of IoT.pdfStephenTec
12 views36 slides
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors by
TouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective SensorsTouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective Sensors
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensorssugiuralab
19 views15 slides
Scaling Knowledge Graph Architectures with AI by
Scaling Knowledge Graph Architectures with AIScaling Knowledge Graph Architectures with AI
Scaling Knowledge Graph Architectures with AIEnterprise Knowledge
30 views15 slides

Recently uploaded(20)

GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... by James Anderson
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson85 views
The details of description: Techniques, tips, and tangents on alternative tex... by BookNet Canada
The details of description: Techniques, tips, and tangents on alternative tex...The details of description: Techniques, tips, and tangents on alternative tex...
The details of description: Techniques, tips, and tangents on alternative tex...
BookNet Canada127 views
Igniting Next Level Productivity with AI-Infused Data Integration Workflows by Safe Software
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software263 views
Unit 1_Lecture 2_Physical Design of IoT.pdf by StephenTec
Unit 1_Lecture 2_Physical Design of IoT.pdfUnit 1_Lecture 2_Physical Design of IoT.pdf
Unit 1_Lecture 2_Physical Design of IoT.pdf
StephenTec12 views
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors by sugiuralab
TouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective SensorsTouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective Sensors
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors
sugiuralab19 views
AMAZON PRODUCT RESEARCH.pdf by JerikkLaureta
AMAZON PRODUCT RESEARCH.pdfAMAZON PRODUCT RESEARCH.pdf
AMAZON PRODUCT RESEARCH.pdf
JerikkLaureta26 views
STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdf by Dr. Jimmy Schwarzkopf
STKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdfSTKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdf
STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdf
Voice Logger - Telephony Integration Solution at Aegis by Nirmal Sharma
Voice Logger - Telephony Integration Solution at AegisVoice Logger - Telephony Integration Solution at Aegis
Voice Logger - Telephony Integration Solution at Aegis
Nirmal Sharma39 views
Piloting & Scaling Successfully With Microsoft Viva by Richard Harbridge
Piloting & Scaling Successfully With Microsoft VivaPiloting & Scaling Successfully With Microsoft Viva
Piloting & Scaling Successfully With Microsoft Viva
Five Things You SHOULD Know About Postman by Postman
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About Postman
Postman33 views
SAP Automation Using Bar Code and FIORI.pdf by Virendra Rai, PMP
SAP Automation Using Bar Code and FIORI.pdfSAP Automation Using Bar Code and FIORI.pdf
SAP Automation Using Bar Code and FIORI.pdf

DDD: lessons learned

  • 1. DDD Lessons Domain modelling lessons that I wish I’d learned earlier
  • 2. Who am I? Lead Developer and Solutions Architect Writing PHP web apps professionally for 12 yrs Recovered Architecture Astronaut A little DDD and EventSourcing obsessed (I will talk for hours) Organiser of PHPDublin @barryosull barry@tercet.io http://barryosull.com
  • 4. Recognising Domain Experts ? ? ? ? ? ? ? Solution Expert Domain Expert
  • 5. Lesson 2 The UI is not a proxy for a Domain Expert
  • 6. The UI is not a proxy for a domain expert Developer How does “X” work?
  • 7. Lesson 3 When interviewing Domain Experts, refine the constraints they define
  • 8. When Interviewing Domain Experts, refine defined constraints ? ? ? ? ? ? ? Domain ExpertDeveloper What happens if X? Well, then it should . . ... ...
  • 9. Lesson 4 Sub Domains and Bounded Contexts are VERY different things
  • 10. Domains and SubDomains are composable Domain: Running a Travel Agency We want to create and sell trips to customers SubDomain: TripBuilding Building trips is expensive SubDomain: Searching Searching across all the services (flight/hotel/car/etc..) is time consuming and error prone SubDomain: Booking Booking trips is time consuming SubDomain: Finance We don't know how effective we are at turning quotes into bookings SubSubDomain: Tracking We don't keep track of what we've quoted SubSubDomain: Reporting We have no way of aggregating this information
  • 11. Bounded Contexts are independent Trip Building IAM CRM Reporting Searching
  • 12. Lesson 5 Domains and contexts do not always align
  • 13. Unaligned sub domains and bounded contexts Payroll Accounting Payroll Accounts Manager HR Reporting Accounting Payroll
  • 14. Other Lessons that I don’t have time to explore Ohh lightning talks, there’s never enough time
  • 15. Other lessons 6: Temporal constraints are far more costly to implement than Value constraints 7. Constant refactoring is key to understanding a domain 8: Hold event storming sessions, even if you're not event sourcing 9: Applying DDD works and it makes you a better developer 10: If it's not your core domain, don't build it yourself, use an existing solution
  • 16. Thank you Any questions? (Please leave feedback on the meetup page!)