SlideShare une entreprise Scribd logo
1  sur  16
Télécharger pour lire hors ligne
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!)

Contenu connexe

Similaire à DDD: lessons learned

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 organizationAleix Morgadas
 
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 designRick van der Arend
 
Fast & Furious Responsive Design in Chrome DevTools
Fast & Furious Responsive Design in Chrome  DevToolsFast & Furious Responsive Design in Chrome  DevTools
Fast & Furious Responsive Design in Chrome DevToolsTony Jessup
 
Code & Cannoli - Domain Driven Design
Code & Cannoli - Domain Driven DesignCode & Cannoli - Domain Driven Design
Code & Cannoli - Domain Driven DesignFrank Levering
 
DITA and Localization: Bringing the Best Together
DITA and Localization: Bringing the Best TogetherDITA and Localization: Bringing the Best Together
DITA and Localization: Bringing the Best TogetherLavaCon
 
AD303: Extreme Makeover – IBM® Lotus® Domino® Application Edition
AD303: Extreme Makeover – IBM® Lotus® Domino® Application EditionAD303: Extreme Makeover – IBM® Lotus® Domino® Application Edition
AD303: Extreme Makeover – IBM® Lotus® Domino® Application EditionRay Bilyk
 
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...
Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Code...Cyrille Martraire
 
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 SDLCAbdul Karim
 
Dynamic C# and a New World of Possibilities
Dynamic C# and a New World of PossibilitiesDynamic C# and a New World of Possibilities
Dynamic C# and a New World of PossibilitiesChicago ALT.NET
 
This isn't what you think it is
This isn't what you think it isThis isn't what you think it is
This isn't what you think it isJoel Cochran
 
Frontend Development vs Backend Development | Detailed Comparison
Frontend Development vs Backend Development | Detailed ComparisonFrontend Development vs Backend Development | Detailed Comparison
Frontend Development vs Backend Development | Detailed ComparisonMariya James
 
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...
apidays LIVE Australia 2021 - Designing Embedded Platforms by Jeremy Glassenb...apidays
 
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 PeopleEmre Sevinç
 
How to become a great developer
How to become a great developerHow to become a great developer
How to become a great developerNetcetera
 
Spark: Authoring Experience++ in Drupal 7, 8, and Beyond
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 BeyondAngela Byron
 
Architecting For Ux
Architecting For UxArchitecting For Ux
Architecting For UxJosh Holmes
 
How to hire flutter developers? A simple yet comprehensive guide
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 guideSnehaDas60
 

Similaire à DDD: lessons learned (20)

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
 
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
 
Fast & Furious Responsive Design in Chrome DevTools
Fast & Furious Responsive Design in Chrome  DevToolsFast & Furious Responsive Design in Chrome  DevTools
Fast & Furious Responsive Design in Chrome DevTools
 
Code & Cannoli - Domain Driven Design
Code & Cannoli - Domain Driven DesignCode & Cannoli - Domain Driven Design
Code & Cannoli - Domain Driven Design
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
DITA and Localization: Bringing the Best Together
DITA and Localization: Bringing the Best TogetherDITA and Localization: Bringing the Best Together
DITA and Localization: Bringing the Best Together
 
AD303: Extreme Makeover – IBM® Lotus® Domino® Application Edition
AD303: Extreme Makeover – IBM® Lotus® Domino® Application EditionAD303: Extreme Makeover – IBM® Lotus® Domino® Application Edition
AD303: Extreme Makeover – IBM® Lotus® Domino® Application Edition
 
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...
Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Code...
 
Altaf_PHP_Developer
Altaf_PHP_DeveloperAltaf_PHP_Developer
Altaf_PHP_Developer
 
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
 
Dynamic C# and a New World of Possibilities
Dynamic C# and a New World of PossibilitiesDynamic C# and a New World of Possibilities
Dynamic C# and a New World of Possibilities
 
This isn't what you think it is
This isn't what you think it isThis isn't what you think it is
This isn't what you think it is
 
Fcc1219
Fcc1219Fcc1219
Fcc1219
 
Frontend Development vs Backend Development | Detailed Comparison
Frontend Development vs Backend Development | Detailed ComparisonFrontend Development vs Backend Development | Detailed Comparison
Frontend Development vs Backend Development | Detailed Comparison
 
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...
apidays LIVE Australia 2021 - Designing Embedded Platforms by Jeremy Glassenb...
 
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
 
How to become a great developer
How to become a great developerHow to become a great developer
How to become a great developer
 
Spark: Authoring Experience++ in Drupal 7, 8, and Beyond
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
 
Architecting For Ux
Architecting For UxArchitecting For Ux
Architecting For Ux
 
How to hire flutter developers? A simple yet comprehensive guide
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
 

Plus de Barry O Sullivan

Building a blog with an Onion Architecture
Building a blog with an Onion ArchitectureBuilding a blog with an Onion Architecture
Building a blog with an Onion ArchitectureBarry O Sullivan
 
Cleaning up your codebase with a clean architecture
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
 
Design patterns - The Good, the Bad, and the Anti-Pattern
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
 

Plus de Barry O Sullivan (6)

Value objects
Value objectsValue objects
Value objects
 
Building a blog with an Onion Architecture
Building a blog with an Onion ArchitectureBuilding a blog with an Onion Architecture
Building a blog with an Onion Architecture
 
Managing expectations
Managing expectationsManaging expectations
Managing expectations
 
Php test fest
Php test festPhp test fest
Php test fest
 
Cleaning up your codebase with a clean architecture
Cleaning up your codebase with a clean architectureCleaning up your codebase with a clean architecture
Cleaning up your codebase with a clean architecture
 
Design patterns - The Good, the Bad, and the Anti-Pattern
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-Pattern
 

Dernier

Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
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 RobisonAnna Loughnan Colquhoun
 
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...Miguel Araújo
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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)wesley chun
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
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 WorkerThousandEyes
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Dernier (20)

Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
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)
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

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!)