SlideShare a Scribd company logo
1 of 43
Download to read offline
@ToJans
What is Domain-Driven Design,
and what can you expect from it?
The model
Every day of the week
I go to work
2
The model
Every day of the week
I go to work
3
The model: every day of the week
Day of the week?
- ?
- ?
- ?
- ?
?
- ?
4
?
- ?
- ?
- ?
- ?
- ?
- ?
The model: every day of the week
Day of the week?
- Monday to Friday
- 8.30AM to 5.00PM
- Break: 12.30PM, 30mins
- Except Friday:
8.30AM to 3.30PM
- 1 Saturday/month
5
?
- ?
- ?
- ?
- ?
- ?
- ?
The model: every day of the week
6
Workday
- Schedule
- Working hours
- Lunch break
- Starting late
- Overtime
- Exceptional Saturday
- ...
The model
Every day of the week
I go to work
7
The model: every day of the week
Weekday?
- Monday to Friday
- 8.30AM to 5.00PM
- lunch break: 12AM, 30mins
- Except Friday:
8.30AM to 3.30PM
- 1 Saturday/month
8
Every day of the week?
- ?
- ?
- ?
- ?
- ?
- ?
The model: every day of the week
Weekday?
- Monday to Friday
- 8.30AM to 5.00PM
- lunch break: 12AM, 30mins
- Except Friday:
8.30AM to 3.30PM
- 1 Saturday/month
9
Every day of the week?
- Official holidays
- Parental leave
- Sick days
- Org closed
- Economical unemployment
- Technical unemployment
The model: every day of the week
10
Workday
- Schedule
- Working hours
- Lunch break
- Starting late
- Overtime
- Exceptional Saturday
- ...
Calendar
- Official holiday
- Employee-initiated absence
- Parental leave
- Sick days (Carens day)
- Employer-initiated absence
- Economical/Technical unemployment
- Group holidays
- ...
The model
Every day of the week
I go to work
11
The model: every day of the week I go to work
12
Workday
Calendar
Schedule
Overtime
Leave
SicknessAbsence
Unemployment
Holiday
ProjectTask
Work log
Billable hour Remote worker
Planning
Deadline
Freelancer Employee
Train
Bike
Car Foot
Deliverable
Customer
Resource
The model: every day of the week I go to work
13
Workday
Calendar
Schedule
Overtime
Leave
SicknessAbsence
Unemployment
Holiday
ProjectTask
Work log
Billable hour Remote worker
Planning
Deadline
Freelancer Employee
Train
Bike
Car Foot
Deliverable
Customer
Resource
Domain-Driven Design
Domain-Driven Design
Tackling complexity
in the heart of software
Eric Evans - @EricEvans0
14
DDD in a tweet
15
DDD in a tweet: implicit explicit: language
Ubiquitous language
16
DDD in a tweet: implicit explicit: language
17
DDD in a tweet
18
DDD in a tweet: implicit explicit: boundaries
boundaries
Strategic design
Bounded contexts
19
DDD in a tweet: implicit explicit: boundaries
Islands
Data ownership
Contracts
Dependencies
Up- & downstream
Of the shelf or custom built
DDD or not
20
DDD in a tweet: implicit explicit: boundaries
21
InfoQ article by
Alberto Brandolini,
a.k.a. @Ziobrando
http://www.infoq.com/articles/ddd-contextmapping
Read it!
DDD in a tweet: implicit explicit: boundaries
boundaries
Tactical patterns
How to design the islands?
22
DDD in a tweet: implicit explicit: boundaries
Data ownership
Transactional boundaries
Island-specific implementations
Expose behavior, not data
Using ubiquitous language
Aggregates, value objects, repositories, ...
23
DDD in a tweet
24
DDD in a tweet: implicit explicit: code
Domain logic only
Smallest unit possible
Human-readable
25
DDD in a tweet: implicit explicit: code: an example
public Catalog(IQueryACatalog Queries, IChangeACatalog Changes,IGenerateProductIds ProductIdGenerator) {
this.Queries = Queries;
this.Changes = Changes;
this.ProductIdGenerator = ProductIdGenerator;
}
public void RegisterProduct(ProductId Id, IEnumerable<FareZone> FareZones) {
Guard.Against<TooManyFareZonesException>(FareZones.Count() > 3);
Guard.Against<DuplicateProductIdException>(Queries.IdExists(Id));
if (Id == ProductId.Empty) Id = ProductIdGenerator.Next();
Changes.ProductRegistered(Id);
}
public void RegisterSubscription(ProductId Id, IEnumerable<FareZone> FareZones, PaymentSchedule Schedule) {
Guard.With<PaymentScheduleRequiredException>(Schedule != PaymentSchedule.Empty);
RegisterProduct(Id, FareZones);
}
26
DDD in a tweet: implicit explicit: code: an example
[TestMethod]
public void should_contain_a_product_when_it_is_registered() {
Catalog.RegisterProduct(a_product_id, some_fare_zones);
Queries.IdExists(a_product_id).ShouldBe(true);
}
[TestMethod, ExpectedException(typeof(DuplicateProductIdException))]
public void should_fail_when_registering_an_existing_id() {
Changes.ProductRegistered(a_product_id);
Catalog.RegisterProduct(a_product_id, some_fare_zones);
}
[TestMethod, ExpectedException(typeof(TooManyFareZonesException))]
public void should_fail_when_registering_too_many_fare_zones() {
Catalog.RegisterProduct(a_product_id, too_many_fare_zones);
}
[TestMethod]
public void should_succeed_when_registering_a_product_with_an_empty_product_id() {
Catalog.RegisterProduct(ProductId.Empty, some_fare_zones);
Queries.IdExists(a_fake_ProductIdGenerator.IdToReturn);
}
27
DDD in a tweet
28
DDD in a tweet: evolve your model
“All models are wrong,
but some are useful”
George E.P. Box
29
DDD in a tweet: evolve your model
“Software is a learning process,
working code is a side effect”
Alberto Brandolini - a.k.a @Ziobrando
30
DDD in a tweet: evolve your model: modellathon
Kazachstan
Education system
pic by
Stijn Volders
a.k.a. @ONE75
31
DDD in a tweet: evolve your model
“Il semble que la perfection soit atteinte
non quand il n'y a plus rien à ajouter,
mais quand il n'y a plus rien à retrancher.”
Antoine de Saint-Exupéry
32
DDD: common mistakes
33
DDD: common mistakes
Using DDD everywhere
Ignoring strategic design
Sharing state or code
BDUF
Frameworks vs libraries
Selling DDD
DDD is evolving (f.e. CQRS-style)
34
DDD: the biggest mistake
How do I … ?
35
DDD: avoid the biggest mistake
“Ask for experience,
not for advice”
Yves Lorphelin, a.k.a. @YLorph
36
DDD: how to get started
“A journey of a thousand miles
begins with a single step”
Lao Tzu
37
DDD: how to get started
The books
38
DDD: how to get started
and...
Go to Julie Lerman’s talk later today:
“Domain-driven design for the Database Driven-Mind”
room 3 - 11.30AM
(Author of http://bit.ly/PS-DDD)
39
DDD: how to get started
Newsgroups:
Yahoo: Domain-driven design / Google: DDD-CQRS
Communities:
@DDDBE / #CQRSBeers
Events:
DDD eXchange London - Friday, June 12th 2015
AND … <DRUMROLL>
40
DDD: how to get started
41
Questions
http://tojans.me - @ToJans
42
43
A big thank you to our partners
Gold Partners
Silver & Social Partners
Platinum Partners

More Related Content

What's hot

Bdd agile requirements
Bdd agile requirementsBdd agile requirements
Bdd agile requirements
Agile Vietnam
 

What's hot (10)

Behaviour Driven Development
Behaviour Driven DevelopmentBehaviour Driven Development
Behaviour Driven Development
 
It's all about behaviour, also in php - phpspec
It's all about behaviour, also in php - phpspecIt's all about behaviour, also in php - phpspec
It's all about behaviour, also in php - phpspec
 
JavaScript Revolution - 5/Nov/13 - PrDC Saskatoon, SK
JavaScript Revolution - 5/Nov/13 - PrDC Saskatoon, SKJavaScript Revolution - 5/Nov/13 - PrDC Saskatoon, SK
JavaScript Revolution - 5/Nov/13 - PrDC Saskatoon, SK
 
Php[tek] 2016 - BDD with Behat for Beginners
Php[tek] 2016 - BDD with Behat for BeginnersPhp[tek] 2016 - BDD with Behat for Beginners
Php[tek] 2016 - BDD with Behat for Beginners
 
Angular 2 : learn TypeScript already with Angular 1
Angular 2 : learn TypeScript already with Angular 1Angular 2 : learn TypeScript already with Angular 1
Angular 2 : learn TypeScript already with Angular 1
 
Creating UI Marketers Won't F*Up
Creating UI Marketers Won't F*UpCreating UI Marketers Won't F*Up
Creating UI Marketers Won't F*Up
 
Lean Prototyping - A Practical Guide
Lean Prototyping - A Practical GuideLean Prototyping - A Practical Guide
Lean Prototyping - A Practical Guide
 
HTML5: The Parts You Care About - 4/Nov/13 - PrDC Saskatoon, SK
HTML5: The Parts You Care About - 4/Nov/13 - PrDC Saskatoon, SKHTML5: The Parts You Care About - 4/Nov/13 - PrDC Saskatoon, SK
HTML5: The Parts You Care About - 4/Nov/13 - PrDC Saskatoon, SK
 
Bdd agile requirements
Bdd agile requirementsBdd agile requirements
Bdd agile requirements
 
Droidcon London 2021 - Full Stack Dart
Droidcon London 2021   - Full Stack DartDroidcon London 2021   - Full Stack Dart
Droidcon London 2021 - Full Stack Dart
 

Viewers also liked

Felipe Rodrigues Ddd The Way Back To Oo
Felipe Rodrigues Ddd The Way Back To OoFelipe Rodrigues Ddd The Way Back To Oo
Felipe Rodrigues Ddd The Way Back To Oo
deimos
 

Viewers also liked (8)

Getting better
Getting betterGetting better
Getting better
 
Leveraging more then DDD Lite in the startup project
Leveraging more then DDD Lite in the startup projectLeveraging more then DDD Lite in the startup project
Leveraging more then DDD Lite in the startup project
 
Functional programming in C#
Functional programming in C#Functional programming in C#
Functional programming in C#
 
Common ddd pitfalls
Common ddd pitfallsCommon ddd pitfalls
Common ddd pitfalls
 
Selling ddd
Selling dddSelling ddd
Selling ddd
 
Domain-driven design - tactical patterns
Domain-driven design - tactical patternsDomain-driven design - tactical patterns
Domain-driven design - tactical patterns
 
Felipe Rodrigues Ddd The Way Back To Oo
Felipe Rodrigues Ddd The Way Back To OoFelipe Rodrigues Ddd The Way Back To Oo
Felipe Rodrigues Ddd The Way Back To Oo
 
Domain Driven Design - Agile France 2010
Domain Driven Design - Agile France 2010Domain Driven Design - Agile France 2010
Domain Driven Design - Agile France 2010
 

Similar to What is "Domain Driven Design" and what can you expect from it?

Cody Childers- Resume
Cody Childers- ResumeCody Childers- Resume
Cody Childers- Resume
Cody Childers
 
Extreme Programming practices for your team
Extreme Programming practices for your teamExtreme Programming practices for your team
Extreme Programming practices for your team
Pawel Lipinski
 

Similar to What is "Domain Driven Design" and what can you expect from it? (20)

Achieving Technical Excellence in Your Software Teams - from Devternity
Achieving Technical Excellence in Your Software Teams - from Devternity Achieving Technical Excellence in Your Software Teams - from Devternity
Achieving Technical Excellence in Your Software Teams - from Devternity
 
Manage your ODI Development Cycle – ODTUG Webinar
Manage your ODI Development Cycle – ODTUG WebinarManage your ODI Development Cycle – ODTUG Webinar
Manage your ODI Development Cycle – ODTUG Webinar
 
MmIT Webinar - Essential tools and technologies for the library and informati...
MmIT Webinar - Essential tools and technologies for the library and informati...MmIT Webinar - Essential tools and technologies for the library and informati...
MmIT Webinar - Essential tools and technologies for the library and informati...
 
Roadmaps Relaunched Bruce McCarthy Workshop BoS Boston 2018 Tesla
Roadmaps Relaunched Bruce McCarthy Workshop BoS Boston 2018 TeslaRoadmaps Relaunched Bruce McCarthy Workshop BoS Boston 2018 Tesla
Roadmaps Relaunched Bruce McCarthy Workshop BoS Boston 2018 Tesla
 
Introduction to Using PHP & MVC Frameworks
Introduction to Using PHP & MVC FrameworksIntroduction to Using PHP & MVC Frameworks
Introduction to Using PHP & MVC Frameworks
 
really really really awesome php application with bdd behat and iterfaces
really really really awesome php application with bdd behat and iterfacesreally really really awesome php application with bdd behat and iterfaces
really really really awesome php application with bdd behat and iterfaces
 
Awesome application in 2014
Awesome application in 2014Awesome application in 2014
Awesome application in 2014
 
Why do most machine learning projects never make it to production
Why do most machine learning projects never make it to productionWhy do most machine learning projects never make it to production
Why do most machine learning projects never make it to production
 
360|iDev 2014 – Your App and the World
360|iDev 2014 – Your App and the World360|iDev 2014 – Your App and the World
360|iDev 2014 – Your App and the World
 
Devoxx: Event storming a DDD/MicroService landscape using post-it's and markers
Devoxx: Event storming a DDD/MicroService landscape using post-it's and markersDevoxx: Event storming a DDD/MicroService landscape using post-it's and markers
Devoxx: Event storming a DDD/MicroService landscape using post-it's and markers
 
Design Systems and Your Product
Design Systems and Your ProductDesign Systems and Your Product
Design Systems and Your Product
 
resolvendo problemas de comunicação em equipes distribuídas com bdd
resolvendo problemas de comunicação em equipes distribuídas com bddresolvendo problemas de comunicação em equipes distribuídas com bdd
resolvendo problemas de comunicação em equipes distribuídas com bdd
 
Get Your Productivity Game On!
Get Your Productivity Game On!Get Your Productivity Game On!
Get Your Productivity Game On!
 
APIs in production - we built it, can we fix it?
APIs in production - we built it, can we fix it?APIs in production - we built it, can we fix it?
APIs in production - we built it, can we fix it?
 
E2D3 introduction
E2D3 introductionE2D3 introduction
E2D3 introduction
 
Cody Childers- Resume
Cody Childers- ResumeCody Childers- Resume
Cody Childers- Resume
 
Extreme Programming practices for your team
Extreme Programming practices for your teamExtreme Programming practices for your team
Extreme Programming practices for your team
 
Testing Pyramid
Testing PyramidTesting Pyramid
Testing Pyramid
 
Data science tools of the trade
Data science tools of the tradeData science tools of the trade
Data science tools of the trade
 
How to train your product owner
How to train your product ownerHow to train your product owner
How to train your product owner
 

Recently uploaded

+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
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Recently uploaded (20)

+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...
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
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
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
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 🔝✔️✔️
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 

What is "Domain Driven Design" and what can you expect from it?

  • 1. @ToJans What is Domain-Driven Design, and what can you expect from it?
  • 2. The model Every day of the week I go to work 2
  • 3. The model Every day of the week I go to work 3
  • 4. The model: every day of the week Day of the week? - ? - ? - ? - ? ? - ? 4 ? - ? - ? - ? - ? - ? - ?
  • 5. The model: every day of the week Day of the week? - Monday to Friday - 8.30AM to 5.00PM - Break: 12.30PM, 30mins - Except Friday: 8.30AM to 3.30PM - 1 Saturday/month 5 ? - ? - ? - ? - ? - ? - ?
  • 6. The model: every day of the week 6 Workday - Schedule - Working hours - Lunch break - Starting late - Overtime - Exceptional Saturday - ...
  • 7. The model Every day of the week I go to work 7
  • 8. The model: every day of the week Weekday? - Monday to Friday - 8.30AM to 5.00PM - lunch break: 12AM, 30mins - Except Friday: 8.30AM to 3.30PM - 1 Saturday/month 8 Every day of the week? - ? - ? - ? - ? - ? - ?
  • 9. The model: every day of the week Weekday? - Monday to Friday - 8.30AM to 5.00PM - lunch break: 12AM, 30mins - Except Friday: 8.30AM to 3.30PM - 1 Saturday/month 9 Every day of the week? - Official holidays - Parental leave - Sick days - Org closed - Economical unemployment - Technical unemployment
  • 10. The model: every day of the week 10 Workday - Schedule - Working hours - Lunch break - Starting late - Overtime - Exceptional Saturday - ... Calendar - Official holiday - Employee-initiated absence - Parental leave - Sick days (Carens day) - Employer-initiated absence - Economical/Technical unemployment - Group holidays - ...
  • 11. The model Every day of the week I go to work 11
  • 12. The model: every day of the week I go to work 12 Workday Calendar Schedule Overtime Leave SicknessAbsence Unemployment Holiday ProjectTask Work log Billable hour Remote worker Planning Deadline Freelancer Employee Train Bike Car Foot Deliverable Customer Resource
  • 13. The model: every day of the week I go to work 13 Workday Calendar Schedule Overtime Leave SicknessAbsence Unemployment Holiday ProjectTask Work log Billable hour Remote worker Planning Deadline Freelancer Employee Train Bike Car Foot Deliverable Customer Resource
  • 14. Domain-Driven Design Domain-Driven Design Tackling complexity in the heart of software Eric Evans - @EricEvans0 14
  • 15. DDD in a tweet 15
  • 16. DDD in a tweet: implicit explicit: language Ubiquitous language 16
  • 17. DDD in a tweet: implicit explicit: language 17
  • 18. DDD in a tweet 18
  • 19. DDD in a tweet: implicit explicit: boundaries boundaries Strategic design Bounded contexts 19
  • 20. DDD in a tweet: implicit explicit: boundaries Islands Data ownership Contracts Dependencies Up- & downstream Of the shelf or custom built DDD or not 20
  • 21. DDD in a tweet: implicit explicit: boundaries 21 InfoQ article by Alberto Brandolini, a.k.a. @Ziobrando http://www.infoq.com/articles/ddd-contextmapping Read it!
  • 22. DDD in a tweet: implicit explicit: boundaries boundaries Tactical patterns How to design the islands? 22
  • 23. DDD in a tweet: implicit explicit: boundaries Data ownership Transactional boundaries Island-specific implementations Expose behavior, not data Using ubiquitous language Aggregates, value objects, repositories, ... 23
  • 24. DDD in a tweet 24
  • 25. DDD in a tweet: implicit explicit: code Domain logic only Smallest unit possible Human-readable 25
  • 26. DDD in a tweet: implicit explicit: code: an example public Catalog(IQueryACatalog Queries, IChangeACatalog Changes,IGenerateProductIds ProductIdGenerator) { this.Queries = Queries; this.Changes = Changes; this.ProductIdGenerator = ProductIdGenerator; } public void RegisterProduct(ProductId Id, IEnumerable<FareZone> FareZones) { Guard.Against<TooManyFareZonesException>(FareZones.Count() > 3); Guard.Against<DuplicateProductIdException>(Queries.IdExists(Id)); if (Id == ProductId.Empty) Id = ProductIdGenerator.Next(); Changes.ProductRegistered(Id); } public void RegisterSubscription(ProductId Id, IEnumerable<FareZone> FareZones, PaymentSchedule Schedule) { Guard.With<PaymentScheduleRequiredException>(Schedule != PaymentSchedule.Empty); RegisterProduct(Id, FareZones); } 26
  • 27. DDD in a tweet: implicit explicit: code: an example [TestMethod] public void should_contain_a_product_when_it_is_registered() { Catalog.RegisterProduct(a_product_id, some_fare_zones); Queries.IdExists(a_product_id).ShouldBe(true); } [TestMethod, ExpectedException(typeof(DuplicateProductIdException))] public void should_fail_when_registering_an_existing_id() { Changes.ProductRegistered(a_product_id); Catalog.RegisterProduct(a_product_id, some_fare_zones); } [TestMethod, ExpectedException(typeof(TooManyFareZonesException))] public void should_fail_when_registering_too_many_fare_zones() { Catalog.RegisterProduct(a_product_id, too_many_fare_zones); } [TestMethod] public void should_succeed_when_registering_a_product_with_an_empty_product_id() { Catalog.RegisterProduct(ProductId.Empty, some_fare_zones); Queries.IdExists(a_fake_ProductIdGenerator.IdToReturn); } 27
  • 28. DDD in a tweet 28
  • 29. DDD in a tweet: evolve your model “All models are wrong, but some are useful” George E.P. Box 29
  • 30. DDD in a tweet: evolve your model “Software is a learning process, working code is a side effect” Alberto Brandolini - a.k.a @Ziobrando 30
  • 31. DDD in a tweet: evolve your model: modellathon Kazachstan Education system pic by Stijn Volders a.k.a. @ONE75 31
  • 32. DDD in a tweet: evolve your model “Il semble que la perfection soit atteinte non quand il n'y a plus rien à ajouter, mais quand il n'y a plus rien à retrancher.” Antoine de Saint-Exupéry 32
  • 34. DDD: common mistakes Using DDD everywhere Ignoring strategic design Sharing state or code BDUF Frameworks vs libraries Selling DDD DDD is evolving (f.e. CQRS-style) 34
  • 35. DDD: the biggest mistake How do I … ? 35
  • 36. DDD: avoid the biggest mistake “Ask for experience, not for advice” Yves Lorphelin, a.k.a. @YLorph 36
  • 37. DDD: how to get started “A journey of a thousand miles begins with a single step” Lao Tzu 37
  • 38. DDD: how to get started The books 38
  • 39. DDD: how to get started and... Go to Julie Lerman’s talk later today: “Domain-driven design for the Database Driven-Mind” room 3 - 11.30AM (Author of http://bit.ly/PS-DDD) 39
  • 40. DDD: how to get started Newsgroups: Yahoo: Domain-driven design / Google: DDD-CQRS Communities: @DDDBE / #CQRSBeers Events: DDD eXchange London - Friday, June 12th 2015 AND … <DRUMROLL> 40
  • 41. DDD: how to get started 41
  • 43. 43 A big thank you to our partners Gold Partners Silver & Social Partners Platinum Partners