SlideShare ist ein Scribd-Unternehmen logo
1 von 16
Downloaden Sie, um offline zu lesen
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!)

Weitere ähnliche Inhalte

Ähnlich wie DDD: lessons learned

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
Joel Cochran
 
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
Angela Byron
 
Architecting For Ux
Architecting For UxArchitecting For Ux
Architecting For Ux
Josh Holmes
 

Ähnlich wie 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
 

Mehr von Barry O Sullivan

Mehr von 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
 

Kürzlich hochgeladen

Kürzlich hochgeladen (20)

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
 
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...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
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?
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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...
 
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
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

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