JakubPilimon
pilo_dev
pilloPl
DOMAIN-DRIVEN DESIGN
THEORY VS PRACTICE
NO UPFRONT DEFINISIONS
DOMAIN-DRIVEN DESIGN?
DDD?
CLEAN CODE?
CLEAN ARCHITECTURE?
CLEAN MODEL?
WHAT IS A MODEL?
INFORMATION GATHERING
MODULARIZATION
EVENT STORMING
EVENT
EVENT EVENT EVENT
PIVOTAL EVENTS
WHAT IS „A DOCUMENT”?
A RICH OBJECT
AN ANEMIC OBJECT
A COMPRESSED DATA
BOUNDED CONTEXT
WHAT IS „A POLICY”?
PIVOTAL EVENTS
OTHER HEURISTICS
LANGUAGE
DEPARTAMENTS
SINGLE SOURCE OF TRUTH
GENERIC AND CORE
PROBLEMS
WHAT KIND OF CODE IS INA
BOUNDED CONTEXT?
WHAT IS AN AGGREGATE?
UNDERSTAND DIFFERENT
TYPES OF LOGIC
SpringOne Tour: Domain-Driven Design: Theory vs Practice
„Can’t spend more money
than you have”
AGGREGATE
COMMAND
CONSISTENCY
„After charging a payer, an
external legacy system must
be informed (unless it is
Friday)”
AGGREGATE
APPLICATION
SERVICE
INTEGRATION/APPLICATION
EXTERNAL
SYSTEM
„ISBN must be correct”
VALIDATION
COMMAND
API
„Order forms are grouped
into packages”
ASK QUESTION: „WHAT DOES IT
CHANGE?”
ORDER
ADDED TO
PACKAGE
ORDER
REMOVED TO
PACKAGE
SO WHAT? WHAT
HAS HAPPENED?
PRESENTATION LOGIC
READ MODEL
ASK QUESTION: „WHAT DOES IT
CHANGE?”
ORDER
ADDED TO
PACKAGE
ORDER
REMOVED TO
PACKAGE
ASSISTANT
(ASSIGNED TO
THE PACKAGE)
NOW HAS
PERMISSION TO
ALL THE FORMS
PERMISSION
TO FORMS
GRANTED
SLICING A PROCESS DOES
NOT ALWAYS WORK
E-Scooter riders place reservations.
Reservation contains a particular e-scooter’s id,
rider’s id and it’s valid for a speci
fi
c amount of time.
There can be only one reservation for a particular
e-scooter at any given point of time.
New reservations are active by default. They can
expire or be canceled.
E-Scooters must be maintained (for instance -
battery replacement)
E-scooters that are put into maintenance mode
can’t be reserved.
E-scooters which are reserved can’t be put into
maintenance mode
Sometimes we predict high demand for e-
scooters in particular zones (areas).
They are delivered to the zone and can’t be
reserved by riders until speci
fi
c time (can’t be
put into maintenance mode either)
We can’t use scooter for a demand if it is
reserved or currently in maintenance.
E-SCOOTER
SERVICE
RESERVATION
(placed?)
E-SCOOTER
(under
maintenance?)
DEMAND
(requested?)
E-SCOOTER
SERVICE
RESERVATION
(placed?)
E-SCOOTER
(under
maintenance?)
DE
DEMAND
(requested?)
E-SCOOTER
SERVICE
RESERVATION
(placed?)
E-SCOOTER
(under
maintenance?)
DE
DEMAND
(requested?)
Block
Block
Block
DEMAND
SERVICE
RESERVATION
(placed?)
E-SCOOTER
(under
maintenance?)
DE
DEMAND
(requested?)
Blocked
Change description
POOR SCALABILITY
OR INCONSISTENCY
POOR TESTABILITY
COGNITIVE LOAD
DISPLAY
READY TO
RIDE
E-SCOOTERS
MAP SERVICE
RESERVATION
(placed?)
E-SCOOTER
(under
maintenance?)
DE
DEMAND
(requested?)
PROBLEMATIC TEAM
DEPENDENCIES
HOW MANY TEAMS GET A
TASK TO DELIVER THAT
STORY?
MAP SERVICE
RESERVATION
(placed?)
E-SCOOTER
(under
maintenance?)
DE
DEMAND
(requested?)
DRY
(LOGIC, NOT CODE!)
COUPLING
MAP SERVICE
RESERVATION
(placed?)
E-SCOOTER
(under
maintenance?)
DE
DEMAND
(requested?)
E-SCOOTER
SERVICE
LOGICAL COUPLING
E-SCOOTER
SERVICE isAvailable?
RESERVATION
(placed?)
E-SCOOTER
(under
maintenance?)
DE
DEMAND
(requested?)
Availability Model
E-SCOOTER
SERVICE
Implementation
detail
Implementation
detail
DE
Implementation
detail
OBSERVABLE
BEHAVIOR
E-SCOOTER
SERVICE
Implementation
detail
Implementation
detail
DE
Implementation
detail
OBSERVABLE
BEHAVIOR
MAP SERVICE
COUPLING TO
OBSERVABLE BEHAVIORS
COUPLING TO
IMPLEMENTATION DETAILS
CONTENT COUPLING
INFORMATION HIDING
HOW TO NOTICE IT IN
YOUR PROJECT?
ASK QUESTION: „WHAT DOES IT
CHANGE?”
RESERVATION
COMPLETED
E-SCOOTER
PUT INTO
MAINTAINEN
ACE MODE
DEMAND
REQUESTED
STATUS IN DB
CHANGED
THERE IS
RESERVATION
RECORD
ASK QUESTION: „WHAT DOES IT
CHANGE?”
RESERVATION
COMPLETED
E-SCOOTER
PUT INTO
MAINTAINEN
ACE MODE
DEMAND
REQUESTED
E-SCOOTER
UNAVAILABLE
ASK QUESTION: „WHAT ELSE CAN
HAVE THE SAME RESULT?”
RESERVATION
COMPLETED
E-SCOOTER
UNAVAILABLE
„DON’T COMPLICATE!”
„COMPLICATION” LEADS
TO PROPER
ABSTRACTIONS
E-SCOOTER
SERVICE
Implementation
detail - reason
Implementation
detail - reason
DE
Implementation
detail - reason
OBSERVABLE
BEHAVIOR
MAP SERVICE
RESERVATION
AND RIDING
MAINTENANCE DE
DEMAND
FORECAST
AVAILABILITY
UNDERSTAND UPSTREAM
VS DOWNSTREAM
SINGLE SOURCE OF
TRUTH
LOCATION
AVAILABILITY
Is it available? Where is it?
Take/release
Register
position
COHESION
NOT JUST LOGICAL
COHESION
Location Availability
E-Scooter E-Scooter
position takenTill
LOCATION
AVAILABILITY
DEMAND
REQUESTED
DEMAND
CANCELED
RESERVATION
COMPLETED
RESERVATION
CANCELED
RESERVATION
EXPIRED
PUT INTO
MAINTAINENC
E MODE
LOCATION
AVAILABILITY
SCOOTER
TAKEN/
RELEASED
DEMAND
…
RESERV
ATION…
UNDERSTAND PUBLISHED
VS PUBLIC
BE LIBERAL INSIDE,
STRICT ON THE OUTSIDE
E-Scooter riders place reservations.
Reservation contains a particular e-scooter’s id,
rider’s id and it’s valid for a speci
fi
c amount of time.
There can be only one reservation for a particular
e-scooter at any given point of time.
New reservations are active by default. They can
expire or be canceled.
WHAT IS A
„RESERVATION?”
RESERVATION
COMPLETED
E-SCOOTER
UNAVAILABLE
E-SCOOTER RESERVATION
JUST A CONSEQUENCE
DECISION EFFECT OF THE DECISION
AGGREGATE READ MODEL
FIND REAL CONCEPTS/
ABSTRACTIONS
OFTENTIMES USER
STORIES ARE JUST FULL
OF UI CONCEPTS
USER STORIES ARE JUST
THE BEGINNING OF A
CONVERSATION
JakubPilimon
pilo_dev
pilloPl
DOMAIN-DRIVEN DESIGN
THEORY VS PRACTICE

More Related Content

PDF
Evolving big microservice architectures
PDF
Forklift free production
PPT
Symbology mediation
PPTX
IMC Summit 2016 Breakout - Aleksandar Seovic - The Illusion of Statelessness
PDF
Software Architecture Anti-Patterns
PDF
Microservices architecture: practical aspects
PDF
The Art of The Event Streaming Application: Streams, Stream Processors and Sc...
PPTX
Kakfa summit london 2019 - the art of the event-streaming app
Evolving big microservice architectures
Forklift free production
Symbology mediation
IMC Summit 2016 Breakout - Aleksandar Seovic - The Illusion of Statelessness
Software Architecture Anti-Patterns
Microservices architecture: practical aspects
The Art of The Event Streaming Application: Streams, Stream Processors and Sc...
Kakfa summit london 2019 - the art of the event-streaming app

Similar to SpringOne Tour: Domain-Driven Design: Theory vs Practice (20)

PPTX
Problems you’ll face in the Microservices World: Configuration, Authenticatio...
PPTX
Grokking Engineering - Data Analytics Infrastructure at Viki - Huy Nguyen
PDF
Herding Microservices – the Atlassian Way
KEY
Deploying Next Gen Systems with Zero Downtime
PDF
XebiCon'17 : Monolith to microservice, histoire d’une transformation centrée...
PDF
Lost in transaction - Strategies to deal with (in)consistency in distributed ...
PDF
Domain Event - The Hidden Gem of DDD
PPTX
Exponential-e | Cloud Revolution Seminar at the Ritz, 20th November 2014
PDF
DDD Europe 2019: Lost in transaction
PDF
The Road To Event-Driven Architecture
PDF
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
PDF
[Practical] Functional Programming in Rails
PDF
Introduction-to-Service-Mesh-with-Istio-and-Kiali-OSS-Japan-July-2019.pdf
PDF
Introduction-to-Service-Mesh-with-Istio-and-Kiali-OSS-Japan-July-2019.pdf
PDF
Cloudify your applications: microservices and beyond
PDF
HERE Mobility SDK Tutorial
PDF
Hong Kong User Group 2019
PPTX
Portal apps (slt)
PDF
Service Mesh @Lara Camp Myanmar - 02 Sep,2023
PDF
Event Driven Streaming Analytics - Demostration on Architecture of IoT
Problems you’ll face in the Microservices World: Configuration, Authenticatio...
Grokking Engineering - Data Analytics Infrastructure at Viki - Huy Nguyen
Herding Microservices – the Atlassian Way
Deploying Next Gen Systems with Zero Downtime
XebiCon'17 : Monolith to microservice, histoire d’une transformation centrée...
Lost in transaction - Strategies to deal with (in)consistency in distributed ...
Domain Event - The Hidden Gem of DDD
Exponential-e | Cloud Revolution Seminar at the Ritz, 20th November 2014
DDD Europe 2019: Lost in transaction
The Road To Event-Driven Architecture
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
[Practical] Functional Programming in Rails
Introduction-to-Service-Mesh-with-Istio-and-Kiali-OSS-Japan-July-2019.pdf
Introduction-to-Service-Mesh-with-Istio-and-Kiali-OSS-Japan-July-2019.pdf
Cloudify your applications: microservices and beyond
HERE Mobility SDK Tutorial
Hong Kong User Group 2019
Portal apps (slt)
Service Mesh @Lara Camp Myanmar - 02 Sep,2023
Event Driven Streaming Analytics - Demostration on Architecture of IoT
Ad

More from VMware Tanzu (20)

PDF
Spring into AI presented by Dan Vega 5/14
PDF
What AI Means For Your Product Strategy And What To Do About It
PDF
Make the Right Thing the Obvious Thing at Cardinal Health 2023
PPTX
Enhancing DevEx and Simplifying Operations at Scale
PDF
Spring Update | July 2023
PPTX
Platforms, Platform Engineering, & Platform as a Product
PPTX
Building Cloud Ready Apps
PDF
Spring Boot 3 And Beyond
PDF
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
PDF
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
PDF
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
PPTX
tanzu_developer_connect.pptx
PDF
Tanzu Virtual Developer Connect Workshop - French
PDF
Tanzu Developer Connect Workshop - English
PDF
Virtual Developer Connect Workshop - English
PDF
Tanzu Developer Connect - French
PDF
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
PDF
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
PDF
SpringOne Tour: The Influential Software Engineer
PDF
SpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
Spring into AI presented by Dan Vega 5/14
What AI Means For Your Product Strategy And What To Do About It
Make the Right Thing the Obvious Thing at Cardinal Health 2023
Enhancing DevEx and Simplifying Operations at Scale
Spring Update | July 2023
Platforms, Platform Engineering, & Platform as a Product
Building Cloud Ready Apps
Spring Boot 3 And Beyond
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
tanzu_developer_connect.pptx
Tanzu Virtual Developer Connect Workshop - French
Tanzu Developer Connect Workshop - English
Virtual Developer Connect Workshop - English
Tanzu Developer Connect - French
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: The Influential Software Engineer
SpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
Ad

Recently uploaded (20)

DOCX
Industrial Bio-Lynx: Advanced Biometric Solution for Workforce Management
PDF
AI-Powered Fuzz Testing: The Future of QA
PPTX
Chapter_05_System Modeling for software engineering
PPTX
Human Computer Interaction lecture Chapter 2.pptx
PPTX
Plex Media Server 1.28.2.6151 With Crac5 2022 Free .
PPTX
ESDS_SAP Application Cloud Offerings.pptx
PPTX
Chapter 1 - Transaction Processing and Mgt.pptx
PDF
Cloud Native Aachen Meetup - Aug 21, 2025
PPTX
DevOpsDays Halifax 2025 - Building 10x Organizations Using Modern Productivit...
PDF
CapCut PRO for PC Crack New Download (Fully Activated 2025)
PDF
Workplace Software and Skills - OpenStax
PDF
Mobile App Backend Development with WordPress REST API: The Complete eBook
PDF
Building an Inclusive Web Accessibility Made Simple with Accessibility Analyzer
PDF
Crypto Loss And Recovery Guide By Expert Recovery Agency.
PPTX
Foundations of Marketo Engage: Nurturing
PDF
Odoo Construction Management System by CandidRoot
PDF
Streamlining Project Management in Microsoft Project, Planner, and Teams with...
PPTX
Post-Migration Optimization Playbook: Getting the Most Out of Your New Adobe ...
PDF
Engineering Document Management System (EDMS)
PPT
3.Software Design for software engineering
Industrial Bio-Lynx: Advanced Biometric Solution for Workforce Management
AI-Powered Fuzz Testing: The Future of QA
Chapter_05_System Modeling for software engineering
Human Computer Interaction lecture Chapter 2.pptx
Plex Media Server 1.28.2.6151 With Crac5 2022 Free .
ESDS_SAP Application Cloud Offerings.pptx
Chapter 1 - Transaction Processing and Mgt.pptx
Cloud Native Aachen Meetup - Aug 21, 2025
DevOpsDays Halifax 2025 - Building 10x Organizations Using Modern Productivit...
CapCut PRO for PC Crack New Download (Fully Activated 2025)
Workplace Software and Skills - OpenStax
Mobile App Backend Development with WordPress REST API: The Complete eBook
Building an Inclusive Web Accessibility Made Simple with Accessibility Analyzer
Crypto Loss And Recovery Guide By Expert Recovery Agency.
Foundations of Marketo Engage: Nurturing
Odoo Construction Management System by CandidRoot
Streamlining Project Management in Microsoft Project, Planner, and Teams with...
Post-Migration Optimization Playbook: Getting the Most Out of Your New Adobe ...
Engineering Document Management System (EDMS)
3.Software Design for software engineering

SpringOne Tour: Domain-Driven Design: Theory vs Practice