SlideShare a Scribd company logo
1 of 33
Jak Charlton jak@thinkddd.com www.thinkddd.com Readify www.readify.net
Practical Domain Driven Design Message Based Architecture and CQRS
Domain Driven Design IS An architectural methodology for evolving a software system  that closely aligns  to business requirements
Domain Driven Design IS NOT A silver bullet A panacea for all your troubles An easy path to follow Always the best solution And most importantly, it is not focused on the How, but the What and Why
Where Are We Going?
The Domain Vision Statement A shared understanding of what it is you are actually trying to create Should be brief, written in clear English and understood by business and tech people alike Should be factual, realistic, honest Should avoid superlatives and marketing speak Should avoid technical and implementation details
Domain = Sphere of Activity?
Domain A Domain is a Sphere of Knowledge, Influenceor Activity A Domain is represented by the Ubiquitous Language A Domain encapsulates a Domain Model A Domain lives within a Bounded Context
The Ubiquitous Language A major reason for failure of software projects is a failure of people, the failure to communicate The Ubiquitous Language is a shared language between the business and the development teams The UL comes from the business, and is enriched by the development teams
Domain Experts Domain Experts are the primary point of contact the development teams have with the business They are the Experts on their part of the business, not just users of the system They should have deep knowledge of the subject Domain
Looks Pretty Unique To Me
Entities Entities are the “things” within your Model An Entity is defined by being unique, and uniquely identifiable
You Can’t Tell One From Another
Value Objects Value Objects are the “things” within your model that have no uniqueness They are equal in all ways to another Value Object if all their properties match Value Objects are interchangeable
How Can We Make Sense?
Domain Model A Domain Model is a representation of the relationships between the Entities and Value Objects in your Domain It may look similar to UML or a class relationship diagram, but it is not one The Domain Model should be recognisable and understandable by the business
That’s a Lot of Bits
Aggregates “An aggregate is a collection of items that are gathered together to form a total quantity” - Wikipedia An Aggregate Root is the root item containing a number of parts that form a whole An AR is more likely to match a Use Case than any model structure
Bounded Contexts When you have multiple models you should consider Bounded Contexts Each BC is a self contained “mini application” containing it’s own model, persistence and code base To map between BCs you use a Context Map
Anti-Corruption Layers An Anti-Corruption Layer is a method to isolate two systems, allowing systems to be integrated without knowledge of each other An ACL presents a Facade to both systems, defined in terms of their specific models ACLs maintain the integrity of a Domain
Persistence Ignorance Subtitled “There Is No Database”  DDD uses the Repository pattern to create Persistence Ignorance A Repository represents itself as an in-memory list of items Repositories are specific to Aggregate Roots, not to Entities
Factors For Success of DDD Your domain is not trivial You have access to Domain Experts You have an iterative process You have a skilled and motivated team
Messaging Architectures DDD is ideally suited to Message Based Architectures DDD is ideally suited to Commands and Events DDD is ideally suited to providing multiple autonomous systems that are loosely coupled
Command Query Responsibility Separation (CQRS) Bertrand Meyer principle of CQS:every method should either be a command that performs an action, or a query that returns data to the caller At an architectural level this means:either issue commands, or issue queries, but never both And, query from a separate source from your domain commands
CQRS in a Picture
Jak Charlton jak@dddstepbystep.co.uk www.dddstepbystep.com Readify www.readify.net

More Related Content

What's hot

Domain Driven Design: Zero to Hero
Domain Driven Design: Zero to HeroDomain Driven Design: Zero to Hero
Domain Driven Design: Zero to HeroFabrício Rissetto
 
Domain Driven Design Demonstrated
Domain Driven Design Demonstrated Domain Driven Design Demonstrated
Domain Driven Design Demonstrated Alan Christensen
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven DesignYoung-Ho Cho
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven DesignNader Albert
 
Domain Driven Design(DDD) Presentation
Domain Driven Design(DDD) PresentationDomain Driven Design(DDD) Presentation
Domain Driven Design(DDD) PresentationOğuzhan Soykan
 
Domain Driven Design - Strategic Patterns and Microservices
Domain Driven Design - Strategic Patterns and MicroservicesDomain Driven Design - Strategic Patterns and Microservices
Domain Driven Design - Strategic Patterns and MicroservicesRadosław Maziarka
 
Clean architecture
Clean architectureClean architecture
Clean architecture.NET Crowd
 
Microservices Architecture Part 2 Event Sourcing and Saga
Microservices Architecture Part 2 Event Sourcing and SagaMicroservices Architecture Part 2 Event Sourcing and Saga
Microservices Architecture Part 2 Event Sourcing and SagaAraf Karsh Hamid
 
Domain Driven Design (Ultra) Distilled
Domain Driven Design (Ultra) DistilledDomain Driven Design (Ultra) Distilled
Domain Driven Design (Ultra) DistilledNicola Costantino
 
Domain-Driven Design
Domain-Driven DesignDomain-Driven Design
Domain-Driven DesignAndriy Buday
 
Domain Driven Design and Hexagonal Architecture
Domain Driven Design and Hexagonal ArchitectureDomain Driven Design and Hexagonal Architecture
Domain Driven Design and Hexagonal ArchitectureCrishantha Nanayakkara
 
Clean Architecture Essentials - Stockholm Software Craftsmanship
Clean Architecture Essentials - Stockholm Software CraftsmanshipClean Architecture Essentials - Stockholm Software Craftsmanship
Clean Architecture Essentials - Stockholm Software CraftsmanshipIvan Paulovich
 
Hexagonal architecture - message-oriented software design
Hexagonal architecture  - message-oriented software designHexagonal architecture  - message-oriented software design
Hexagonal architecture - message-oriented software designMatthias Noback
 
DDD Strategic Design - Context Maps - Paulo Clavijo - April 2018
DDD Strategic Design - Context Maps - Paulo Clavijo - April 2018DDD Strategic Design - Context Maps - Paulo Clavijo - April 2018
DDD Strategic Design - Context Maps - Paulo Clavijo - April 2018Paulo Clavijo
 
DDD - 1 - A gentle introduction to Domain Driven Design.pdf
DDD - 1 - A gentle introduction to Domain Driven Design.pdfDDD - 1 - A gentle introduction to Domain Driven Design.pdf
DDD - 1 - A gentle introduction to Domain Driven Design.pdfEleonora Ciceri
 

What's hot (20)

Domain Driven Design: Zero to Hero
Domain Driven Design: Zero to HeroDomain Driven Design: Zero to Hero
Domain Driven Design: Zero to Hero
 
Domain Driven Design Demonstrated
Domain Driven Design Demonstrated Domain Driven Design Demonstrated
Domain Driven Design Demonstrated
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Domain Driven Design 101
Domain Driven Design 101Domain Driven Design 101
Domain Driven Design 101
 
Domain Driven Design(DDD) Presentation
Domain Driven Design(DDD) PresentationDomain Driven Design(DDD) Presentation
Domain Driven Design(DDD) Presentation
 
Domain Driven Design - Strategic Patterns and Microservices
Domain Driven Design - Strategic Patterns and MicroservicesDomain Driven Design - Strategic Patterns and Microservices
Domain Driven Design - Strategic Patterns and Microservices
 
Clean architecture
Clean architectureClean architecture
Clean architecture
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Domain driven design
Domain driven designDomain driven design
Domain driven design
 
Microservices Architecture Part 2 Event Sourcing and Saga
Microservices Architecture Part 2 Event Sourcing and SagaMicroservices Architecture Part 2 Event Sourcing and Saga
Microservices Architecture Part 2 Event Sourcing and Saga
 
Domain Driven Design (Ultra) Distilled
Domain Driven Design (Ultra) DistilledDomain Driven Design (Ultra) Distilled
Domain Driven Design (Ultra) Distilled
 
Domain-Driven Design
Domain-Driven DesignDomain-Driven Design
Domain-Driven Design
 
Domain Driven Design and Hexagonal Architecture
Domain Driven Design and Hexagonal ArchitectureDomain Driven Design and Hexagonal Architecture
Domain Driven Design and Hexagonal Architecture
 
Clean Architecture Essentials - Stockholm Software Craftsmanship
Clean Architecture Essentials - Stockholm Software CraftsmanshipClean Architecture Essentials - Stockholm Software Craftsmanship
Clean Architecture Essentials - Stockholm Software Craftsmanship
 
Hexagonal architecture - message-oriented software design
Hexagonal architecture  - message-oriented software designHexagonal architecture  - message-oriented software design
Hexagonal architecture - message-oriented software design
 
DDD Strategic Design - Context Maps - Paulo Clavijo - April 2018
DDD Strategic Design - Context Maps - Paulo Clavijo - April 2018DDD Strategic Design - Context Maps - Paulo Clavijo - April 2018
DDD Strategic Design - Context Maps - Paulo Clavijo - April 2018
 
DDD - 1 - A gentle introduction to Domain Driven Design.pdf
DDD - 1 - A gentle introduction to Domain Driven Design.pdfDDD - 1 - A gentle introduction to Domain Driven Design.pdf
DDD - 1 - A gentle introduction to Domain Driven Design.pdf
 

Viewers also liked

Jivy Group - Saying Goodbye
Jivy Group - Saying GoodbyeJivy Group - Saying Goodbye
Jivy Group - Saying GoodbyeRavit Friedberg
 
Domain-driven design - eine Einführung
Domain-driven design - eine EinführungDomain-driven design - eine Einführung
Domain-driven design - eine Einführungdie.agilen GmbH
 
CQRS, der etwas andere Architekturansatz
CQRS, der etwas andere ArchitekturansatzCQRS, der etwas andere Architekturansatz
CQRS, der etwas andere ArchitekturansatzOPEN KNOWLEDGE GmbH
 

Viewers also liked (6)

Pastsimple4
Pastsimple4Pastsimple4
Pastsimple4
 
Jivy Group - Saying Goodbye
Jivy Group - Saying GoodbyeJivy Group - Saying Goodbye
Jivy Group - Saying Goodbye
 
Domain-driven design - eine Einführung
Domain-driven design - eine EinführungDomain-driven design - eine Einführung
Domain-driven design - eine Einführung
 
Domain-Driven Design
Domain-Driven DesignDomain-Driven Design
Domain-Driven Design
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
CQRS, der etwas andere Architekturansatz
CQRS, der etwas andere ArchitekturansatzCQRS, der etwas andere Architekturansatz
CQRS, der etwas andere Architekturansatz
 

Similar to A Practical Guide to Domain Driven Design: Presentation Slides

Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven DesignMuhammad Ali
 
Seminar - Scalable Enterprise Application Development Using DDD and CQRS
Seminar - Scalable Enterprise Application Development Using DDD and CQRSSeminar - Scalable Enterprise Application Development Using DDD and CQRS
Seminar - Scalable Enterprise Application Development Using DDD and CQRSMizanur Sarker
 
Writing good C# code for good cloud applications - Draft Oct 20, 2014
Writing good C# code for good cloud applications - Draft Oct 20, 2014Writing good C# code for good cloud applications - Draft Oct 20, 2014
Writing good C# code for good cloud applications - Draft Oct 20, 2014Marco Parenzan
 
D2 domain driven-design
D2 domain driven-designD2 domain driven-design
D2 domain driven-designArnaud Bouchez
 
Up to speed in domain driven design
Up to speed in domain driven designUp to speed in domain driven design
Up to speed in domain driven designRick van der Arend
 
Domain-Driven Design
Domain-Driven DesignDomain-Driven Design
Domain-Driven DesignBradley Holt
 
Nina Grantcharova - Approach to Separation of Concerns via Design Patterns
Nina Grantcharova - Approach to Separation of Concerns via Design PatternsNina Grantcharova - Approach to Separation of Concerns via Design Patterns
Nina Grantcharova - Approach to Separation of Concerns via Design Patternsiasaglobal
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven DesignLalit Kale
 
Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"
Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"
Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"GlobalLogic Ukraine
 
The Big Picture - Integrating Buzzwords
The Big Picture - Integrating BuzzwordsThe Big Picture - Integrating Buzzwords
The Big Picture - Integrating BuzzwordsAlessandro Giorgetti
 
Architecture and design
Architecture and designArchitecture and design
Architecture and designhimanshu_airon
 
Introduction to Domain-Driven Design
Introduction to Domain-Driven DesignIntroduction to Domain-Driven Design
Introduction to Domain-Driven DesignR-P-Azevedo
 
Domain driven design
Domain driven designDomain driven design
Domain driven designits_skm
 
Domain Driven Design & Hexagonal Architecture
Domain Driven Design & Hexagonal ArchitectureDomain Driven Design & Hexagonal Architecture
Domain Driven Design & Hexagonal ArchitectureCan Pekdemir
 
Importance Of Being Driven
Importance Of Being DrivenImportance Of Being Driven
Importance Of Being DrivenAntonio Terreno
 

Similar to A Practical Guide to Domain Driven Design: Presentation Slides (20)

DDD
DDDDDD
DDD
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Seminar - Scalable Enterprise Application Development Using DDD and CQRS
Seminar - Scalable Enterprise Application Development Using DDD and CQRSSeminar - Scalable Enterprise Application Development Using DDD and CQRS
Seminar - Scalable Enterprise Application Development Using DDD and CQRS
 
Writing good C# code for good cloud applications - Draft Oct 20, 2014
Writing good C# code for good cloud applications - Draft Oct 20, 2014Writing good C# code for good cloud applications - Draft Oct 20, 2014
Writing good C# code for good cloud applications - Draft Oct 20, 2014
 
D2 domain driven-design
D2 domain driven-designD2 domain driven-design
D2 domain driven-design
 
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
 
Domain-Driven Design
Domain-Driven DesignDomain-Driven Design
Domain-Driven Design
 
Ooad
OoadOoad
Ooad
 
Nina Grantcharova - Approach to Separation of Concerns via Design Patterns
Nina Grantcharova - Approach to Separation of Concerns via Design PatternsNina Grantcharova - Approach to Separation of Concerns via Design Patterns
Nina Grantcharova - Approach to Separation of Concerns via Design Patterns
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"
Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"
Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"
 
The Big Picture - Integrating Buzzwords
The Big Picture - Integrating BuzzwordsThe Big Picture - Integrating Buzzwords
The Big Picture - Integrating Buzzwords
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Architecture and design
Architecture and designArchitecture and design
Architecture and design
 
Introduction to Domain-Driven Design
Introduction to Domain-Driven DesignIntroduction to Domain-Driven Design
Introduction to Domain-Driven Design
 
Domain driven design
Domain driven designDomain driven design
Domain driven design
 
Let's talk about... Microservices
Let's talk about... MicroservicesLet's talk about... Microservices
Let's talk about... Microservices
 
Domain Driven Design & Hexagonal Architecture
Domain Driven Design & Hexagonal ArchitectureDomain Driven Design & Hexagonal Architecture
Domain Driven Design & Hexagonal Architecture
 
DDD In Agile
DDD In Agile   DDD In Agile
DDD In Agile
 
Importance Of Being Driven
Importance Of Being DrivenImportance Of Being Driven
Importance Of Being Driven
 

Recently uploaded

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 

Recently uploaded (20)

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 

A Practical Guide to Domain Driven Design: Presentation Slides

  • 1. Jak Charlton jak@thinkddd.com www.thinkddd.com Readify www.readify.net
  • 2. Practical Domain Driven Design Message Based Architecture and CQRS
  • 3. Domain Driven Design IS An architectural methodology for evolving a software system that closely aligns to business requirements
  • 4. Domain Driven Design IS NOT A silver bullet A panacea for all your troubles An easy path to follow Always the best solution And most importantly, it is not focused on the How, but the What and Why
  • 5. Where Are We Going?
  • 6. The Domain Vision Statement A shared understanding of what it is you are actually trying to create Should be brief, written in clear English and understood by business and tech people alike Should be factual, realistic, honest Should avoid superlatives and marketing speak Should avoid technical and implementation details
  • 7. Domain = Sphere of Activity?
  • 8. Domain A Domain is a Sphere of Knowledge, Influenceor Activity A Domain is represented by the Ubiquitous Language A Domain encapsulates a Domain Model A Domain lives within a Bounded Context
  • 9.
  • 10. The Ubiquitous Language A major reason for failure of software projects is a failure of people, the failure to communicate The Ubiquitous Language is a shared language between the business and the development teams The UL comes from the business, and is enriched by the development teams
  • 11.
  • 12. Domain Experts Domain Experts are the primary point of contact the development teams have with the business They are the Experts on their part of the business, not just users of the system They should have deep knowledge of the subject Domain
  • 14. Entities Entities are the “things” within your Model An Entity is defined by being unique, and uniquely identifiable
  • 15. You Can’t Tell One From Another
  • 16. Value Objects Value Objects are the “things” within your model that have no uniqueness They are equal in all ways to another Value Object if all their properties match Value Objects are interchangeable
  • 17. How Can We Make Sense?
  • 18. Domain Model A Domain Model is a representation of the relationships between the Entities and Value Objects in your Domain It may look similar to UML or a class relationship diagram, but it is not one The Domain Model should be recognisable and understandable by the business
  • 19. That’s a Lot of Bits
  • 20. Aggregates “An aggregate is a collection of items that are gathered together to form a total quantity” - Wikipedia An Aggregate Root is the root item containing a number of parts that form a whole An AR is more likely to match a Use Case than any model structure
  • 21.
  • 22. Bounded Contexts When you have multiple models you should consider Bounded Contexts Each BC is a self contained “mini application” containing it’s own model, persistence and code base To map between BCs you use a Context Map
  • 23.
  • 24. Anti-Corruption Layers An Anti-Corruption Layer is a method to isolate two systems, allowing systems to be integrated without knowledge of each other An ACL presents a Facade to both systems, defined in terms of their specific models ACLs maintain the integrity of a Domain
  • 25.
  • 26. Persistence Ignorance Subtitled “There Is No Database”  DDD uses the Repository pattern to create Persistence Ignorance A Repository represents itself as an in-memory list of items Repositories are specific to Aggregate Roots, not to Entities
  • 27.
  • 28. Factors For Success of DDD Your domain is not trivial You have access to Domain Experts You have an iterative process You have a skilled and motivated team
  • 29. Messaging Architectures DDD is ideally suited to Message Based Architectures DDD is ideally suited to Commands and Events DDD is ideally suited to providing multiple autonomous systems that are loosely coupled
  • 30. Command Query Responsibility Separation (CQRS) Bertrand Meyer principle of CQS:every method should either be a command that performs an action, or a query that returns data to the caller At an architectural level this means:either issue commands, or issue queries, but never both And, query from a separate source from your domain commands
  • 31. CQRS in a Picture
  • 32.
  • 33. Jak Charlton jak@dddstepbystep.co.uk www.dddstepbystep.com Readify www.readify.net