SlideShare a Scribd company logo
1 of 22
What is Domain Driven
Design and why it matters
Managing complexity
● Software projects are increasingly complex and sophisticated.
● Systems integrates with many third party services
● Modern databases, hardware and tools makes it easier to create bigger
systems
● Design techniques commonly taught (UML, design patterns, SOLID) don’t
help much handling massive projects
Taking a bike for a ride. Simple, right?
Under the cover
● Handling payment and sensitive information (credit card).
● Detecting a bike is returned is not 100% reliable
● Sensors or other hardware component may fail
● Finding suitable station for renting/returning a bike
● Many different ways of billing a client
Complexity - Where does it come from?
● Mixing business logic with infrastructure concerns
● Inherent complexity of the domain itself (accounting, physics, shipping,
etc)
● Number of concepts to know in order to accomplish a task.
● Sheer size. A feature may be simple in isolation but complex in a system,
given how it links with it
Symptoms of acute complexity illness
● Difficulty explaining a concept or action
● Adding a feature automatically means modifying other parts of the system.
(Reports, other modules)
● Recurring communication issues between customers, support, sales and
devs on a particular topic
Old ideas in a new(ish) package
● DDD is a unified collection of patterns and guidelines
● The value is in “tackling complexity”, defining how all its elements and how
they are used to reach that goal
● A pattern is a tool, not a solution by itself. A tool must be used diligently,
for a reason.
Ubiquitous Language
The terms and their definition in a domain.
Words commonly have many definitions and sometimes are misused.
A domain dictionary defines all the terms and definitions, providing one global
source of truth
A dangerous source of spaghetti code
A class management system
- Special pricing for children.
- Tax credit for children
- Child only activity
- Different forms for adult and children
Modeling with objects -> Children and Adult classes, maybe a common base
class. Simple enough(?)
From the dictionary
- person between birth and puberty.
- A person who has not attained maturity or the age of legal majority.
- One who is childish or immature.
- A son or daughter; an offspring.
- A member of a tribe; descendant.
- An individual regarded as strongly affected by another or by a specified
time, place, or circumstance: a child of nature; a child of the Sixties.
Definitions from the use cases
- Government considers a child, for tax credits purpose, is between 6 and 14
years old.
- Below majority in most cases (Wait, majority in which country?)
- What happens when the child reaches majority? Need to convert the data?
- New feature request: special pricing and tax credits for seniors.
The solution
Repairing the table
- Turns out the only thing we actually care about is age.
- The child and adult concepts create multiple edge cases to handle for zero
added value.
- One single class is a better fit given this context.
An alternative design - Specification pattern
Eligibility criterion
Bool isEligible(Client)
Age
Subscription
(Bounded) Contexts
How can we understand each other when words have fuzzy meaning and
multiple definitions?
Humans are clever and can correct ambiguities themselves. How? By using the
current context to make logical deductions.
Machines have no taste for poetry, metaphors and figures of speech.
- A domain model represents a concept and puts it in a structured way.
- Concepts, attributes, how do they relate to each other
- A real-object can be modeled in many ways, there is no right answer.
- A good model captures the relevant aspects for a given context and leaves
out the irrelevant details.
- A given model can be both accurate and useless
Domain model
Administrative map of Quebec
Aggregates
- Technical pattern.
- Defines consistency units, composed of one or many entities.
- Enforces invariants.
Docking station as aggregate root
Docking Station Screen
Bike
Docking port
Takeaways
- Define a clear vocabulary and spread that knowledge
- A definition is usually coupled to a given context
- Complex domains can be dealt with using modeling techniques
- A concept maps to many models - find one appropriate to your context
Questions?
Thank you for attending!
@plmaheu

More Related Content

Similar to What is Domain Driven Design and Why it Matters

How UXD Can Provide Leadership Skills for Complex Software Projects: A 4-Day ...
How UXD Can Provide Leadership Skills for Complex Software Projects: A 4-Day ...How UXD Can Provide Leadership Skills for Complex Software Projects: A 4-Day ...
How UXD Can Provide Leadership Skills for Complex Software Projects: A 4-Day ...Greg Laugero
 
Special Report on 71 Characteristics of Digital Curriculum
Special Report on 71 Characteristics of Digital CurriculumSpecial Report on 71 Characteristics of Digital Curriculum
Special Report on 71 Characteristics of Digital CurriculumLeiLani Cauthen
 
How Business Alignment Is The Relationship Between It...
How Business Alignment Is The Relationship Between It...How Business Alignment Is The Relationship Between It...
How Business Alignment Is The Relationship Between It...Robin Anderson
 
Economicsof socialcomputing richblankv2_2008
Economicsof socialcomputing richblankv2_2008Economicsof socialcomputing richblankv2_2008
Economicsof socialcomputing richblankv2_2008Rich Blank
 
Essay Narrative Example. Narrative Essay PDF Essays Narrative
Essay Narrative Example. Narrative Essay  PDF  Essays  NarrativeEssay Narrative Example. Narrative Essay  PDF  Essays  Narrative
Essay Narrative Example. Narrative Essay PDF Essays NarrativeElizabeth Pardue
 
Achieving learning success through tech
Achieving learning success through techAchieving learning success through tech
Achieving learning success through techRichardGlatt
 
Knowledge Management & E-learning - useful links and lessons learnt
Knowledge Management & E-learning - useful links and lessons learntKnowledge Management & E-learning - useful links and lessons learnt
Knowledge Management & E-learning - useful links and lessons learntMaja Vujovic
 
Interactive XAI for ODSC East 2023
Interactive XAI for ODSC East 2023Interactive XAI for ODSC East 2023
Interactive XAI for ODSC East 2023Meg Kurdziolek
 
H8rs Gonna H8 - Learning to Love New Salesforce Communication Channels
H8rs Gonna H8 - Learning to Love New Salesforce Communication ChannelsH8rs Gonna H8 - Learning to Love New Salesforce Communication Channels
H8rs Gonna H8 - Learning to Love New Salesforce Communication ChannelsLen Lipkin
 
Thesis Concept Km V0.1
Thesis Concept Km V0.1Thesis Concept Km V0.1
Thesis Concept Km V0.1Amber Krishan
 
Starting a KM Initiative
Starting a KM InitiativeStarting a KM Initiative
Starting a KM InitiativeKM Chicago
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven DesignMuhammad Ali
 
Keynote acm10.14.2017
Keynote acm10.14.2017Keynote acm10.14.2017
Keynote acm10.14.2017Alo Ghosh
 

Similar to What is Domain Driven Design and Why it Matters (18)

How UXD Can Provide Leadership Skills for Complex Software Projects: A 4-Day ...
How UXD Can Provide Leadership Skills for Complex Software Projects: A 4-Day ...How UXD Can Provide Leadership Skills for Complex Software Projects: A 4-Day ...
How UXD Can Provide Leadership Skills for Complex Software Projects: A 4-Day ...
 
Special Report on 71 Characteristics of Digital Curriculum
Special Report on 71 Characteristics of Digital CurriculumSpecial Report on 71 Characteristics of Digital Curriculum
Special Report on 71 Characteristics of Digital Curriculum
 
Main
MainMain
Main
 
How Business Alignment Is The Relationship Between It...
How Business Alignment Is The Relationship Between It...How Business Alignment Is The Relationship Between It...
How Business Alignment Is The Relationship Between It...
 
Economicsof socialcomputing richblankv2_2008
Economicsof socialcomputing richblankv2_2008Economicsof socialcomputing richblankv2_2008
Economicsof socialcomputing richblankv2_2008
 
Essay Narrative Example. Narrative Essay PDF Essays Narrative
Essay Narrative Example. Narrative Essay  PDF  Essays  NarrativeEssay Narrative Example. Narrative Essay  PDF  Essays  Narrative
Essay Narrative Example. Narrative Essay PDF Essays Narrative
 
Working with concept maps
Working with concept mapsWorking with concept maps
Working with concept maps
 
Achieving learning success through tech
Achieving learning success through techAchieving learning success through tech
Achieving learning success through tech
 
Knowledge Management & E-learning - useful links and lessons learnt
Knowledge Management & E-learning - useful links and lessons learntKnowledge Management & E-learning - useful links and lessons learnt
Knowledge Management & E-learning - useful links and lessons learnt
 
Semantic intelligence
Semantic intelligenceSemantic intelligence
Semantic intelligence
 
Interactive XAI for ODSC East 2023
Interactive XAI for ODSC East 2023Interactive XAI for ODSC East 2023
Interactive XAI for ODSC East 2023
 
H8rs Gonna H8 - Learning to Love New Salesforce Communication Channels
H8rs Gonna H8 - Learning to Love New Salesforce Communication ChannelsH8rs Gonna H8 - Learning to Love New Salesforce Communication Channels
H8rs Gonna H8 - Learning to Love New Salesforce Communication Channels
 
The CMLC 1.0.pdf
The CMLC 1.0.pdfThe CMLC 1.0.pdf
The CMLC 1.0.pdf
 
Thesis Concept Km V0.1
Thesis Concept Km V0.1Thesis Concept Km V0.1
Thesis Concept Km V0.1
 
Starting a KM Initiative
Starting a KM InitiativeStarting a KM Initiative
Starting a KM Initiative
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Ola ei nov. 22 2103
Ola ei nov. 22 2103Ola ei nov. 22 2103
Ola ei nov. 22 2103
 
Keynote acm10.14.2017
Keynote acm10.14.2017Keynote acm10.14.2017
Keynote acm10.14.2017
 

Recently uploaded

How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 

Recently uploaded (20)

How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 

What is Domain Driven Design and Why it Matters

  • 1. What is Domain Driven Design and why it matters
  • 2. Managing complexity ● Software projects are increasingly complex and sophisticated. ● Systems integrates with many third party services ● Modern databases, hardware and tools makes it easier to create bigger systems ● Design techniques commonly taught (UML, design patterns, SOLID) don’t help much handling massive projects
  • 3. Taking a bike for a ride. Simple, right?
  • 4. Under the cover ● Handling payment and sensitive information (credit card). ● Detecting a bike is returned is not 100% reliable ● Sensors or other hardware component may fail ● Finding suitable station for renting/returning a bike ● Many different ways of billing a client
  • 5. Complexity - Where does it come from? ● Mixing business logic with infrastructure concerns ● Inherent complexity of the domain itself (accounting, physics, shipping, etc) ● Number of concepts to know in order to accomplish a task. ● Sheer size. A feature may be simple in isolation but complex in a system, given how it links with it
  • 6. Symptoms of acute complexity illness ● Difficulty explaining a concept or action ● Adding a feature automatically means modifying other parts of the system. (Reports, other modules) ● Recurring communication issues between customers, support, sales and devs on a particular topic
  • 7. Old ideas in a new(ish) package ● DDD is a unified collection of patterns and guidelines ● The value is in “tackling complexity”, defining how all its elements and how they are used to reach that goal ● A pattern is a tool, not a solution by itself. A tool must be used diligently, for a reason.
  • 8. Ubiquitous Language The terms and their definition in a domain. Words commonly have many definitions and sometimes are misused. A domain dictionary defines all the terms and definitions, providing one global source of truth
  • 9. A dangerous source of spaghetti code
  • 10. A class management system - Special pricing for children. - Tax credit for children - Child only activity - Different forms for adult and children Modeling with objects -> Children and Adult classes, maybe a common base class. Simple enough(?)
  • 11. From the dictionary - person between birth and puberty. - A person who has not attained maturity or the age of legal majority. - One who is childish or immature. - A son or daughter; an offspring. - A member of a tribe; descendant. - An individual regarded as strongly affected by another or by a specified time, place, or circumstance: a child of nature; a child of the Sixties.
  • 12. Definitions from the use cases - Government considers a child, for tax credits purpose, is between 6 and 14 years old. - Below majority in most cases (Wait, majority in which country?) - What happens when the child reaches majority? Need to convert the data? - New feature request: special pricing and tax credits for seniors.
  • 14. Repairing the table - Turns out the only thing we actually care about is age. - The child and adult concepts create multiple edge cases to handle for zero added value. - One single class is a better fit given this context.
  • 15. An alternative design - Specification pattern Eligibility criterion Bool isEligible(Client) Age Subscription
  • 16. (Bounded) Contexts How can we understand each other when words have fuzzy meaning and multiple definitions? Humans are clever and can correct ambiguities themselves. How? By using the current context to make logical deductions. Machines have no taste for poetry, metaphors and figures of speech.
  • 17. - A domain model represents a concept and puts it in a structured way. - Concepts, attributes, how do they relate to each other - A real-object can be modeled in many ways, there is no right answer. - A good model captures the relevant aspects for a given context and leaves out the irrelevant details. - A given model can be both accurate and useless Domain model
  • 19. Aggregates - Technical pattern. - Defines consistency units, composed of one or many entities. - Enforces invariants.
  • 20. Docking station as aggregate root Docking Station Screen Bike Docking port
  • 21. Takeaways - Define a clear vocabulary and spread that knowledge - A definition is usually coupled to a given context - Complex domains can be dealt with using modeling techniques - A concept maps to many models - find one appropriate to your context
  • 22. Questions? Thank you for attending! @plmaheu

Editor's Notes

  1. Not diving deeply into implementation Using examples from past jobs
  2. The whole is more complex than simply the sum of its parts
  3. A system is always more complex than the sum of its parts
  4. People communicate in ambiguous ways and do not realize they are constantly making assumptions.
  5. Software for managing registrations, forms, etc.
  6. By definition, anybody can be a child.
  7. The model turns out to be cumbersome and riddled with problems
  8. Contexts: accounting, shipping, registration, inventory management, payment processing, etc.
  9. An accurate model of Quebec. Also useless if I need to go from A to B.
  10. Invariants: Time based ranges do not overlap each other No duplicates Valid range of values (not null, not empty, etc) So data, so to speak is always valid regarless of the callers. Many services, for example, may do similar operations and use the same aggregates.
  11. Ensures consistency Encapsulates methods such as get free docking ports