SlideShare a Scribd company logo
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!)

More Related Content

Similar to 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 organization
Aleix 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 design
Rick 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 DevTools
Tony Jessup
Ā 
Code & Cannoli - Domain Driven Design
Code & Cannoli - Domain Driven DesignCode & Cannoli - Domain Driven Design
Code & Cannoli - Domain Driven Design
Frank Levering
Ā 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
Mojammel Haque
Ā 
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
LavaCon
Ā 
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
Ray 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 SDLC
Abdul 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 Possibilities
Chicago 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
Ā 
Fcc1219
Fcc1219Fcc1219
Fcc1219
Thinkful
Ā 
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
Mariya 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 People
Emre SevinƧ
Ā 
How to become a great developer
How to become a great developerHow to become a great developer
How to become a great developer
Netcetera
Ā 
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 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 guide
SnehaDas60
Ā 

Similar to 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
Ā 

More from Barry O Sullivan

Value objects
Value objectsValue objects
Value objects
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 Architecture
Barry O Sullivan
Ā 
Managing expectations
Managing expectationsManaging expectations
Managing expectations
Barry O Sullivan
Ā 
Php test fest
Php test festPhp test fest
Php test fest
Barry 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 architecture
Barry 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-Pattern
Barry O Sullivan
Ā 

More from 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
Ā 

Recently uploaded

Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
Ā 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
Ā 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
Ā 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
Ā 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
Ā 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
Ā 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
Ā 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
Ā 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
Ā 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
Ā 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
Ā 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
Ā 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
Ā 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
Ā 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
Ā 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
Ā 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
Ā 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
Ā 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
Ā 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
Ā 

Recently uploaded (20)

Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Ā 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
Ā 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Ā 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
Ā 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Ā 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Ā 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Ā 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
Ā 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Ā 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Ā 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ā 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Ā 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
Ā 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
Ā 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Ā 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Ā 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Ā 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
Ā 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Ā 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Ā 

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