SlideShare a Scribd company logo
Domain driven design
https://nl.linkedin.com/in/iefcuynen
@iefcuynen
Ief Cuynen
Domain Driven Design
Tackling Complexity in the Heart of Software
https://nl.linkedin.com/in/
It is not the strongest of the species
that survives, nor the most intelligent
that survives.
It is the one that is most adaptable to
change
- Charles Darwin
Big Ball Of Mud
Strategic modeling
Domain & subdomains
Yep, same picture
Bounded contexts
Still the same
Context Maps: high level integration overview
Types
• Partnership
• Shared Kernel
• Customer-Supplier
• Conformist
• Anticorruption Layer
• Published Language
• Separate Ways
• Big Ball Of Mud
Old school domain modeling
airCraft.setRoute(newRoute)
airCraft.go()
Technical methods
Separate Lingo
• Business
• Architecture
• Developer
• Code
Domain driven Modeling
Ubiquitous language
business = architecture = developer = code
Business methods
flightplan.assignFlightRoute(route)
flight.takeOff()
Domain model – building blocks
 Entities
 Have an unique identity
 Continuous change over time
 Built up from value objects
 E.g Customer
 Value objects
 Objects that matter only as the combinations of their attributes
 No identity
 Immutable
 E.g. money, address
Domain model – building blocks
 Domain Services
 Connects to another remote domain model for interaction
 E.g. FlighplanFinder
 Aggregates
 Cluster of domain objects that can be treated as a single unit.
 E.g. Invoice & invoice lines
 Domain Events
 Business events fired after change of aggregate
Hexagonal Architecture
CQRS Command Query Responsibility Segregation
Command and Query models
 Command
 Domain model
 Publishes busines events
 Query
 Built using domain events
 Best fit for each specific goal
 GUI
 Data mining
 Reporting
Command Model
X
Command Model
Y
Query Model A Query Model B
Event sourcing
 Store the domain events in an event store
 Perfect match with CQRS
 Events can be replayed to
 build new query models
 Rebuild existing query models
DDD excels in
 Complex business domains
 Fast changing busines domains
 Scalable applications
 Asynchronous communication
 Micro services (= bounded context)
 Push and pull
 Caching
 Failure proof applications
DDD caveats
 Domain modeling is hard
 Can be expensive
 Complex integration
 Eventual consistency

More Related Content

PPTX
Domain driven design
PDF
Introduction to-ddd
PPTX
Implementing DDD with C#
PPTX
Domain Driven Design Quickly
PDF
Tactical DDD (just better OOP?) - PHPBenelux 2017
PDF
Refactoring for Domain Driven Design
PDF
Domain-Driven Design with ASP.NET MVC
PDF
Elements of DDD with ASP.NET MVC & Entity Framework Code First
Domain driven design
Introduction to-ddd
Implementing DDD with C#
Domain Driven Design Quickly
Tactical DDD (just better OOP?) - PHPBenelux 2017
Refactoring for Domain Driven Design
Domain-Driven Design with ASP.NET MVC
Elements of DDD with ASP.NET MVC & Entity Framework Code First

What's hot (16)

PPTX
Implementing DDD Concepts in PHP
PDF
Domain Driven Design
PDF
Elements of DDD with ASP.NET MVC & Entity Framework Code First v2
PPTX
Js slideshare
PDF
CaseTalk Transformations - 10 slide intro
PDF
Domain Event - The Hidden Gem of DDD
PPTX
Entity Framework - Object Services
PPTX
Why do I Love C#?
PPTX
domain driven design talk
PPTX
Proxy Design Pattern
PDF
Context oriented architecture - Put the boundary in the right place
PPTX
Advanced oop laws, principles, idioms
PPTX
Design pattern proxy介紹 20130805
PPTX
Proxy Design Patterns
PPTX
Domain driven design
PDF
Clean architecture with ddd layering in php
Implementing DDD Concepts in PHP
Domain Driven Design
Elements of DDD with ASP.NET MVC & Entity Framework Code First v2
Js slideshare
CaseTalk Transformations - 10 slide intro
Domain Event - The Hidden Gem of DDD
Entity Framework - Object Services
Why do I Love C#?
domain driven design talk
Proxy Design Pattern
Context oriented architecture - Put the boundary in the right place
Advanced oop laws, principles, idioms
Design pattern proxy介紹 20130805
Proxy Design Patterns
Domain driven design
Clean architecture with ddd layering in php
Ad

Viewers also liked (20)

PPTX
Domain-Driven Design workshops
PDF
Domain-Driven Design und Hexagonale Architektur
PDF
What is DDD and how could it help you
PDF
Domain-driven design - tactical patterns
PDF
From legacy to DDD
PDF
Ddd reboot (english version)
PPTX
CQRS and what it means for your architecture
PPTX
Our way to microservices
PDF
Modelling a complex domain with Domain-Driven Design
PPTX
Domain driven design
PPTX
Why Domain-Driven Design and Reactive Programming?
PDF
Developing event-driven microservices with event sourcing and CQRS (phillyete)
PPTX
Designing APIs and Microservices Using Domain-Driven Design
PDF
Domain Driven Design Introduction
PPTX
A Practical Guide to Domain Driven Design: Presentation Slides
PPTX
Architecting Microservices in .Net
PDF
The art of Software Design
PDF
Developing microservices with aggregates (devnexus2017)
PDF
PDF
DDD patterns that were not in the book
Domain-Driven Design workshops
Domain-Driven Design und Hexagonale Architektur
What is DDD and how could it help you
Domain-driven design - tactical patterns
From legacy to DDD
Ddd reboot (english version)
CQRS and what it means for your architecture
Our way to microservices
Modelling a complex domain with Domain-Driven Design
Domain driven design
Why Domain-Driven Design and Reactive Programming?
Developing event-driven microservices with event sourcing and CQRS (phillyete)
Designing APIs and Microservices Using Domain-Driven Design
Domain Driven Design Introduction
A Practical Guide to Domain Driven Design: Presentation Slides
Architecting Microservices in .Net
The art of Software Design
Developing microservices with aggregates (devnexus2017)
DDD patterns that were not in the book
Ad

Similar to Domain driven design (20)

PPTX
Combining Private and Public Clouds into Meaningful Hybrids
PDF
Shaping serverless architecture with domain driven design patterns
PDF
Shaping serverless architecture with domain driven design patterns
PPTX
CQRS and Event Sourcing, An Alternative Architecture for DDD
PPTX
Techcello at a glance
PPTX
Cloud application architecture with sql azure and windows azure
PPTX
Techcello at a glance
PPTX
Building multi tenancy enterprise applications - quick
ODP
RailswayCon 2010 - Command Your Domain
PDF
D2 domain driven-design
PPTX
Unilever: Greenhouse - Norm Driskell
PPTX
Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"
PDF
Infrastructure Agnostic Machine Learning Workload Deployment
PDF
How to use hybrid cloud to migrate and deploy unified business applications i...
PPTX
Windowsazureplatform Overviewlatest
DOCX
Ravi Chinnasamy
PPTX
The REMICS model-driven process for migrating legacy applications to the cloud
PDF
Shaping serverless architecture with domain driven design patterns - py web-il
PPT
Pattern-Oriented Distributed Software Architectures
PPTX
MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantica...
Combining Private and Public Clouds into Meaningful Hybrids
Shaping serverless architecture with domain driven design patterns
Shaping serverless architecture with domain driven design patterns
CQRS and Event Sourcing, An Alternative Architecture for DDD
Techcello at a glance
Cloud application architecture with sql azure and windows azure
Techcello at a glance
Building multi tenancy enterprise applications - quick
RailswayCon 2010 - Command Your Domain
D2 domain driven-design
Unilever: Greenhouse - Norm Driskell
Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"
Infrastructure Agnostic Machine Learning Workload Deployment
How to use hybrid cloud to migrate and deploy unified business applications i...
Windowsazureplatform Overviewlatest
Ravi Chinnasamy
The REMICS model-driven process for migrating legacy applications to the cloud
Shaping serverless architecture with domain driven design patterns - py web-il
Pattern-Oriented Distributed Software Architectures
MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantica...

More from jstack (9)

PPTX
Ignite content security policy
PPTX
Ignite docker
PPTX
Git branching strategies
PPT
Auto Merge Queue
PPTX
Ionic
PPTX
Gradle
PPTX
Flyway - database migrations made easy
PDF
Ignite es6
PPTX
Software development terminology
Ignite content security policy
Ignite docker
Git branching strategies
Auto Merge Queue
Ionic
Gradle
Flyway - database migrations made easy
Ignite es6
Software development terminology

Recently uploaded (20)

PPTX
Odoo POS Development Services by CandidRoot Solutions
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
Introduction to Artificial Intelligence
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
Online Work Permit System for Fast Permit Processing
PPTX
history of c programming in notes for students .pptx
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
L1 - Introduction to python Backend.pptx
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
Odoo POS Development Services by CandidRoot Solutions
ManageIQ - Sprint 268 Review - Slide Deck
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Which alternative to Crystal Reports is best for small or large businesses.pdf
Navsoft: AI-Powered Business Solutions & Custom Software Development
Introduction to Artificial Intelligence
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Online Work Permit System for Fast Permit Processing
history of c programming in notes for students .pptx
Operating system designcfffgfgggggggvggggggggg
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
VVF-Customer-Presentation2025-Ver1.9.pptx
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
L1 - Introduction to python Backend.pptx
Understanding Forklifts - TECH EHS Solution
Wondershare Filmora 15 Crack With Activation Key [2025
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Design an Analysis of Algorithms II-SECS-1021-03
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Upgrade and Innovation Strategies for SAP ERP Customers

Domain driven design

  • 2. https://nl.linkedin.com/in/iefcuynen @iefcuynen Ief Cuynen Domain Driven Design Tackling Complexity in the Heart of Software https://nl.linkedin.com/in/
  • 3. It is not the strongest of the species that survives, nor the most intelligent that survives. It is the one that is most adaptable to change - Charles Darwin
  • 8. Context Maps: high level integration overview Types • Partnership • Shared Kernel • Customer-Supplier • Conformist • Anticorruption Layer • Published Language • Separate Ways • Big Ball Of Mud
  • 9. Old school domain modeling airCraft.setRoute(newRoute) airCraft.go() Technical methods Separate Lingo • Business • Architecture • Developer • Code
  • 10. Domain driven Modeling Ubiquitous language business = architecture = developer = code Business methods flightplan.assignFlightRoute(route) flight.takeOff()
  • 11. Domain model – building blocks  Entities  Have an unique identity  Continuous change over time  Built up from value objects  E.g Customer  Value objects  Objects that matter only as the combinations of their attributes  No identity  Immutable  E.g. money, address
  • 12. Domain model – building blocks  Domain Services  Connects to another remote domain model for interaction  E.g. FlighplanFinder  Aggregates  Cluster of domain objects that can be treated as a single unit.  E.g. Invoice & invoice lines  Domain Events  Business events fired after change of aggregate
  • 14. CQRS Command Query Responsibility Segregation
  • 15. Command and Query models  Command  Domain model  Publishes busines events  Query  Built using domain events  Best fit for each specific goal  GUI  Data mining  Reporting Command Model X Command Model Y Query Model A Query Model B
  • 16. Event sourcing  Store the domain events in an event store  Perfect match with CQRS  Events can be replayed to  build new query models  Rebuild existing query models
  • 17. DDD excels in  Complex business domains  Fast changing busines domains  Scalable applications  Asynchronous communication  Micro services (= bounded context)  Push and pull  Caching  Failure proof applications
  • 18. DDD caveats  Domain modeling is hard  Can be expensive  Complex integration  Eventual consistency

Editor's Notes

  • #5: Initial a simple model will suffice the business needs but without care and consideration it quickly turns in a big ball of mud Hard to maintain Hard to adapt
  • #6: Domain = Problem space that needs to be solved Can be the business of the entire organisation or a subset Subdomain = Different business domains making up the entire domain Invoicing Stock Orders Inventory Core domain = sub domain where the most business value is gained. Differentiator in the market 20% of the total business value, 5% of the code, 80% of the effort (Eric Evans) Supporting subdomain Essential to business but not core Generic subdomain Non core subdomain E.g. invoicing Vendor package / outsource Bounded context Explicit boundary for a domain model
  • #7: Domain = Problem space that needs to be solved Can be the business of the entire organisation or a subset Subdomain = Different business domains making up the entire domain Invoicing Stock Orders Inventory Core domain = sub domain where the most business value is gained. Differentiator in the market 20% of the total business value, 5% of the code, 80% of the effort (Eric Evans) Supporting subdomain Essential to business but not core Generic subdomain Non core subdomain E.g. invoicing Vendor package / outsource Bounded context Explicit boundary for a domain model
  • #8: Domain = Problem space that needs to be solved Can be the business of the entire organisation or a subset Subdomain = Different business domains making up the entire domain Invoicing Stock Orders Inventory Core domain = sub domain where the most business value is gained. Differentiator in the market 20% of the total business value, 5% of the code, 80% of the effort (Eric Evans) Supporting subdomain Essential to business but not core Generic subdomain Non core subdomain E.g. invoicing Vendor package / outsource Bounded context Explicit boundary for a domain model
  • #9: Context map = visual representation of Bounded contexts and their relationships Upstream = An upstream bounded context have an impact on a downstream bounded contexts Downstream = A downstream bounded context is impacted by upstream bounded contexts Relationships Partnership : 2 contexts succeed or fail together (released on same time) Shared Kernel : Intimate dependency between 2 or more bounded context by sharing a common bounded context Customer-Supplier: 2 bounded contexts in an upstream / downstream relationship where the success of the upstream is also dependent of the downstream bounded context Conformist: 2 bounded contexts in an upstream / downstream relationship where the downstream bounded context has no voice or impact whatsoever on the upstream bounded context Anticorruption Layer: When the downstream bounded context implements an isolation layer, to provide functionality of the upstream bounded context in terms of the downstream domain model E.g. Used to integrate legacy systems Open Host Service: Defines a protocol that gives access to the bounded context as a set of services E.g. REST services Published language: Well documented shared language that can express the necessary domain information as a common medium of communication E.g. Events Big Ball Of Mud Mixed models and inconsistent boundaries
  • #10: Ubiquitous language Business lingo = architecture lingo = developer lingo = code A term is unique within a domain model but can have a completely different meaning in another domain model E.g. product as in a ‘scrum domain’ vs product in a ‘webshop domain’ Anemic domain model No behavior in the domain model All logic in application / infrastructure layers Small object graph Complex domain models bound to fail
  • #11: Ubiquitous language Business lingo = architecture lingo = developer lingo = code A term is unique within a domain model but can have a completely different meaning in another domain model E.g. product as in a ‘scrum domain’ vs product in a ‘webshop domain’ Anemic domain model No behavior in the domain model All logic in application / infrastructure layers Small object graph Complex domain models bound to fail
  • #14: Layered Architecture User Interface Layer Accepts User Commands and presents information back to the user Application Layer Managed transactions, translates DTOs, coordinates application activities, creates and accesses domain objects Domain Layer Contains the state and behavior of the domain Infrastructure Layer Supports all the other layers, includes repositories, adapters, frameworks Hexagonal Architecture promotes the separation of concerns through layers of responsibility Higher level of abstraction