1giovedì 23 maggio 13
Goals
Quickly sketch a model for a complex
system
Have the basic concepts of Domain-
Driven Design emerge without
prerequirements.
2giovedì 23 maggio 13
3giovedì 23 maggio 13
In practice...
Stick a paper roll on a wall.
We might have up to 25 metres of
modeling space
Collaborative work
4giovedì 23 maggio 13
Yes, I mean that much
space...
5giovedì 23 maggio 13
Domain Events
Might resemble an Activity Diagram
...but we’re not doing UML
Events cannot be discussed. They happened. Deal
with it.
System-wide view.
Every team start to imagine a domain, instead
of asking to the domain expert... :-(
Real system might be a lot simpler
Real system might be a lot more complex
6giovedì 23 maggio 13
Hint:
...it gets a lot more interesting if we
explore areas we don’t know.
... with the domain expert.
... with concrete examples.
7giovedì 23 maggio 13
8giovedì 23 maggio 13
Event Origin
Events do not just appear out of the
blue:
some originate from user actions
some originate in external systems
some are generated by time
...some are originated as a response to other
events
9giovedì 23 maggio 13
10giovedì 23 maggio 13
FLOW (team decided this way)
Team decided to start
from the right... we
called it WOLF instead
of FLOW then.
11giovedì 23 maggio 13
12giovedì 23 maggio 13
Event Flow
Search for predecessors or
consequences of our events
Using verbs in the past helps clarify the
semantics:
“wedding” is not an event, it’s a process (don’t
tell it to your wife)
More actors are joining our system
13giovedì 23 maggio 13
14giovedì 23 maggio 13
Aggregates
“How do I correctly define
aggregates?” ... yes, that’s THE
question
Have a look to DDD mailing lists, if you don’t
believe it
Our goal is to define aggregates outside
in
15giovedì 23 maggio 13
Definition
An aggregate represents consistency
unit: a group of classes changing state
together.
...but it’s not always clear enough...
...how big these objects are?
...how do they look like?
It has something to do with transactional
boundaries but ours might be wrong.
16giovedì 23 maggio 13
Rule of thumb
To sketch aggregate boundaries we can
think about
Informations deleted together
Informations moved together
Informations distributed together
...but that’s still a little too data-centric
17giovedì 23 maggio 13
Invariants
Forget data:
An aggregate can accept or reject a
command.
Upon which information?
What is always guaranteed for our
aggregate?
18giovedì 23 maggio 13
19giovedì 23 maggio 13
Aggregates
Shifting the focus on invariants helps
aggregate modeling
Smaller, more controllable units
Variations are propagated via Domain Events
A better domain exploration
The whole is eventually consistent
20giovedì 23 maggio 13
Example
Max particpants per class:
Where does this constraint come from?
Classroom capacity? --> accept and look for a
better location (if there’s time available)
Class physiological limit --> stand-by and
waiting list or propose next edition
No accidental complexity requirements.
21giovedì 23 maggio 13
22giovedì 23 maggio 13
Subdomains
Business level system partitioning
Some portions are core for our company
competitivity.
Es. things that are going to sell more.
Other are simply necessary, but no key
differentiators.
Es. invoicing: it’s needed but no customer will
choose us for the invoice layout. Good enough is
good enough.
23giovedì 23 maggio 13
Languages
In mid/large-sized companies we’ll have
many stakeholders.
Different goals
different backgrounds,
different languages
...will require different models
Caution: we aren’t talking about Bounded
Contexts...yet
24giovedì 23 maggio 13
25giovedì 23 maggio 13
Bounded Contexts
Highlight the different models in play
Software components
Legacy components
Languages used
They’re a realistic snapshot, not the
image of our wishes...
26giovedì 23 maggio 13
27giovedì 23 maggio 13
Users & Personas
Got a chance to include users and their
categories in the picture? Why not!?
We can highlight personas and make
them part of the model...
...especially if this triggers an
interesting conversation with the
domain experts.
28giovedì 23 maggio 13
29giovedì 23 maggio 13
Tests
Some interesting details might emerge
during the conversation. Why not take a
note?
In natural language
...according to BDD lingo (--> Cucumber)
In an event driven perspective, the
structure Given [events] When
[command] Then [event] fits very well :-)
30giovedì 23 maggio 13
31giovedì 23 maggio 13
Takeaways
Model of a complex enterprise system
ignoring data
... what if data model is part of the problem?
Tight focus on system behavior and not
on static data structure.
32giovedì 23 maggio 13
Takeaways
The model is created collectively in a
cooperative learning fashion and
provides a good high-level view.
Are you sure DEs know everything?
Time-boxed, but....
Space-boxed but....
33giovedì 23 maggio 13
Legacy Systems
The sketched model is close to an “ideal
system model”
It’s NOT the starting point to rewrite from scratch!
But it’s a good reference to establish a direction
Legacy components that do not belong in the
domain emerge like accidental complexity.
batch operations, legacy stuff feel really
inappropriate.
34giovedì 23 maggio 13
35giovedì 23 maggio 13

More Related Content

PDF
Rethinking enterprise software - Codemotion 2014
PDF
The final words about software estimation
PDF
Idea stickies green bar - Wroclaw edition
PDF
Why do all my ddd apps look the same - Vienna 2014
PDF
The alignment
KEY
Loosely Coupled Complexity - Unleash the power of your Domain Model with Comm...
PDF
Event storming recipes
PDF
Redesigning everything (avanscoperta meeutp edition)
Rethinking enterprise software - Codemotion 2014
The final words about software estimation
Idea stickies green bar - Wroclaw edition
Why do all my ddd apps look the same - Vienna 2014
The alignment
Loosely Coupled Complexity - Unleash the power of your Domain Model with Comm...
Event storming recipes
Redesigning everything (avanscoperta meeutp edition)

What's hot (18)

PDF
It's not simple at all
PDF
The sweet spot
PDF
What lies beneath
PDF
Optimized for what
PDF
The Architecture of Uncertainty
PDF
Redesigning everything ITARC Stockholm 2021
PDF
Extreme DDD modelling
PDF
Pissing against the wind
PDF
4 PM Anti-Patterns
PPTX
30% faster coder on-boarding when you have a code cookbook
PDF
How to be Pixel Perfect (Replaces Making Accessibility Accessible) - Matt Gy...
PDF
Transactions redefined
PPTX
1. solution design 1 design sprint
PPTX
User stories applied ch4
PPTX
Experience Agile Programming - Kiev
PDF
Design sprint info deck
PDF
Real developers-dont-need-unit-tests
It's not simple at all
The sweet spot
What lies beneath
Optimized for what
The Architecture of Uncertainty
Redesigning everything ITARC Stockholm 2021
Extreme DDD modelling
Pissing against the wind
4 PM Anti-Patterns
30% faster coder on-boarding when you have a code cookbook
How to be Pixel Perfect (Replaces Making Accessibility Accessible) - Matt Gy...
Transactions redefined
1. solution design 1 design sprint
User stories applied ch4
Experience Agile Programming - Kiev
Design sprint info deck
Real developers-dont-need-unit-tests
Ad

Viewers also liked (18)

PDF
Model storming
PPTX
Event storming
PPTX
Introduzione al Domain Driven Design (DDD)
KEY
DDD 2011 - Dove Desideriamo Dirigerci
PPTX
Domain Model e SOA (Service Oriented Architecture)
PPTX
EventStorming Agile Tour Aix-Marseille
PDF
How I did it (in .NET): idiomatic Domain Driven Design
PDF
Domain Driven Design Up And Running
PPTX
DDDesign Challenges
KEY
Event sourcing
PPTX
Domain Driven Design - DDDSydney 2011
PPTX
Unleash Your Domain With Greg Young @ DDD-Day
PDF
DDD Dirty Harry style
PPTX
Introdução ao Domain-Driven Design
PDF
Projections explained
PPTX
Greg Young on Architectural Innovation: Eventing, Event Sourcing
PPTX
A Practical Guide to Domain Driven Design: Presentation Slides
PDF
Socrates BE - Projections Explained
Model storming
Event storming
Introduzione al Domain Driven Design (DDD)
DDD 2011 - Dove Desideriamo Dirigerci
Domain Model e SOA (Service Oriented Architecture)
EventStorming Agile Tour Aix-Marseille
How I did it (in .NET): idiomatic Domain Driven Design
Domain Driven Design Up And Running
DDDesign Challenges
Event sourcing
Domain Driven Design - DDDSydney 2011
Unleash Your Domain With Greg Young @ DDD-Day
DDD Dirty Harry style
Introdução ao Domain-Driven Design
Projections explained
Greg Young on Architectural Innovation: Eventing, Event Sourcing
A Practical Guide to Domain Driven Design: Presentation Slides
Socrates BE - Projections Explained
Ad

Similar to Event based modeling - eng (20)

PPT
Domain Driven Design (DDD)
PPTX
Domain Driven Design Introduction
PPTX
Domain Driven Design
PPTX
Up to speed in domain driven design
PDF
D2 domain driven-design
PDF
50.000 orange stickies later
PDF
Domain-Driven Design
PDF
Domain Driven Design
PDF
Adopting Domain-Driven Design in your organization
PDF
Modelling a complex domain with Domain-Driven Design
PDF
Domain Driven Design
PDF
Domain driven design: a gentle introduction
PDF
DevDay2017 ESGI Essential DDD
PDF
SOAT Agile Day 2017 DDD
PDF
Domain Driven Design: A Precis
PDF
Extreme DDD Modelling Patterns - 2024 Devoxx Poland
PPTX
Creating a shared understanding through Story Mapping, Spec by Example, & Dom...
PDF
Domain Driven Design - Distillation - Chapter 15
PDF
Introduction to Domain driven design
PDF
DDD beyond the infamous repository pattern - GeeCon Prague 2018
Domain Driven Design (DDD)
Domain Driven Design Introduction
Domain Driven Design
Up to speed in domain driven design
D2 domain driven-design
50.000 orange stickies later
Domain-Driven Design
Domain Driven Design
Adopting Domain-Driven Design in your organization
Modelling a complex domain with Domain-Driven Design
Domain Driven Design
Domain driven design: a gentle introduction
DevDay2017 ESGI Essential DDD
SOAT Agile Day 2017 DDD
Domain Driven Design: A Precis
Extreme DDD Modelling Patterns - 2024 Devoxx Poland
Creating a shared understanding through Story Mapping, Spec by Example, & Dom...
Domain Driven Design - Distillation - Chapter 15
Introduction to Domain driven design
DDD beyond the infamous repository pattern - GeeCon Prague 2018

More from Alberto Brandolini (15)

PDF
DDD tales from ProductLand - NewCrafts Paris - May 2024
PDF
1 Million Orange Stickies later - Devoxx Poland 2024
PDF
Modelling Up - DDDEurope 2024 - Amsterdam
PDF
All the Small Things - XP2024 Bolzano/Bozen
PDF
L'illusione dell'ortogonalità
PDF
The gordian knot
PDF
Software design as a cooperative game with EventStorming
PDF
La fatina dei denti
PDF
Chasing elephants
PDF
Reshaping enterrprise software
PDF
Guerrilla portfolio management
PDF
The precision blade
PDF
Managing debt remastered
PDF
Liberate il kraken
PDF
Bullshit Asymmetry Principle lightning talk
DDD tales from ProductLand - NewCrafts Paris - May 2024
1 Million Orange Stickies later - Devoxx Poland 2024
Modelling Up - DDDEurope 2024 - Amsterdam
All the Small Things - XP2024 Bolzano/Bozen
L'illusione dell'ortogonalità
The gordian knot
Software design as a cooperative game with EventStorming
La fatina dei denti
Chasing elephants
Reshaping enterrprise software
Guerrilla portfolio management
The precision blade
Managing debt remastered
Liberate il kraken
Bullshit Asymmetry Principle lightning talk

Recently uploaded (20)

PDF
ment.tech-Siri Delay Opens AI Startup Opportunity in 2025.pdf
PDF
The AI Revolution in Customer Service - 2025
PPTX
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
PDF
CEH Module 2 Footprinting CEH V13, concepts
PDF
MENA-ECEONOMIC-CONTEXT-VC MENA-ECEONOMIC
PDF
Data Virtualization in Action: Scaling APIs and Apps with FME
PDF
Auditboard EB SOX Playbook 2023 edition.
PDF
IT-ITes Industry bjjbnkmkhkhknbmhkhmjhjkhj
PDF
A symptom-driven medical diagnosis support model based on machine learning te...
PDF
A hybrid framework for wild animal classification using fine-tuned DenseNet12...
PPTX
SGT Report The Beast Plan and Cyberphysical Systems of Control
PDF
substrate PowerPoint Presentation basic one
PDF
AI.gov: A Trojan Horse in the Age of Artificial Intelligence
PDF
Co-training pseudo-labeling for text classification with support vector machi...
PDF
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
PDF
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
PDF
Advancing precision in air quality forecasting through machine learning integ...
PDF
Electrocardiogram sequences data analytics and classification using unsupervi...
PDF
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
PDF
NewMind AI Weekly Chronicles – August ’25 Week IV
ment.tech-Siri Delay Opens AI Startup Opportunity in 2025.pdf
The AI Revolution in Customer Service - 2025
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
CEH Module 2 Footprinting CEH V13, concepts
MENA-ECEONOMIC-CONTEXT-VC MENA-ECEONOMIC
Data Virtualization in Action: Scaling APIs and Apps with FME
Auditboard EB SOX Playbook 2023 edition.
IT-ITes Industry bjjbnkmkhkhknbmhkhmjhjkhj
A symptom-driven medical diagnosis support model based on machine learning te...
A hybrid framework for wild animal classification using fine-tuned DenseNet12...
SGT Report The Beast Plan and Cyberphysical Systems of Control
substrate PowerPoint Presentation basic one
AI.gov: A Trojan Horse in the Age of Artificial Intelligence
Co-training pseudo-labeling for text classification with support vector machi...
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
Advancing precision in air quality forecasting through machine learning integ...
Electrocardiogram sequences data analytics and classification using unsupervi...
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
NewMind AI Weekly Chronicles – August ’25 Week IV

Event based modeling - eng

  • 2. Goals Quickly sketch a model for a complex system Have the basic concepts of Domain- Driven Design emerge without prerequirements. 2giovedì 23 maggio 13
  • 4. In practice... Stick a paper roll on a wall. We might have up to 25 metres of modeling space Collaborative work 4giovedì 23 maggio 13
  • 5. Yes, I mean that much space... 5giovedì 23 maggio 13
  • 6. Domain Events Might resemble an Activity Diagram ...but we’re not doing UML Events cannot be discussed. They happened. Deal with it. System-wide view. Every team start to imagine a domain, instead of asking to the domain expert... :-( Real system might be a lot simpler Real system might be a lot more complex 6giovedì 23 maggio 13
  • 7. Hint: ...it gets a lot more interesting if we explore areas we don’t know. ... with the domain expert. ... with concrete examples. 7giovedì 23 maggio 13
  • 9. Event Origin Events do not just appear out of the blue: some originate from user actions some originate in external systems some are generated by time ...some are originated as a response to other events 9giovedì 23 maggio 13
  • 11. FLOW (team decided this way) Team decided to start from the right... we called it WOLF instead of FLOW then. 11giovedì 23 maggio 13
  • 13. Event Flow Search for predecessors or consequences of our events Using verbs in the past helps clarify the semantics: “wedding” is not an event, it’s a process (don’t tell it to your wife) More actors are joining our system 13giovedì 23 maggio 13
  • 15. Aggregates “How do I correctly define aggregates?” ... yes, that’s THE question Have a look to DDD mailing lists, if you don’t believe it Our goal is to define aggregates outside in 15giovedì 23 maggio 13
  • 16. Definition An aggregate represents consistency unit: a group of classes changing state together. ...but it’s not always clear enough... ...how big these objects are? ...how do they look like? It has something to do with transactional boundaries but ours might be wrong. 16giovedì 23 maggio 13
  • 17. Rule of thumb To sketch aggregate boundaries we can think about Informations deleted together Informations moved together Informations distributed together ...but that’s still a little too data-centric 17giovedì 23 maggio 13
  • 18. Invariants Forget data: An aggregate can accept or reject a command. Upon which information? What is always guaranteed for our aggregate? 18giovedì 23 maggio 13
  • 20. Aggregates Shifting the focus on invariants helps aggregate modeling Smaller, more controllable units Variations are propagated via Domain Events A better domain exploration The whole is eventually consistent 20giovedì 23 maggio 13
  • 21. Example Max particpants per class: Where does this constraint come from? Classroom capacity? --> accept and look for a better location (if there’s time available) Class physiological limit --> stand-by and waiting list or propose next edition No accidental complexity requirements. 21giovedì 23 maggio 13
  • 23. Subdomains Business level system partitioning Some portions are core for our company competitivity. Es. things that are going to sell more. Other are simply necessary, but no key differentiators. Es. invoicing: it’s needed but no customer will choose us for the invoice layout. Good enough is good enough. 23giovedì 23 maggio 13
  • 24. Languages In mid/large-sized companies we’ll have many stakeholders. Different goals different backgrounds, different languages ...will require different models Caution: we aren’t talking about Bounded Contexts...yet 24giovedì 23 maggio 13
  • 26. Bounded Contexts Highlight the different models in play Software components Legacy components Languages used They’re a realistic snapshot, not the image of our wishes... 26giovedì 23 maggio 13
  • 28. Users & Personas Got a chance to include users and their categories in the picture? Why not!? We can highlight personas and make them part of the model... ...especially if this triggers an interesting conversation with the domain experts. 28giovedì 23 maggio 13
  • 30. Tests Some interesting details might emerge during the conversation. Why not take a note? In natural language ...according to BDD lingo (--> Cucumber) In an event driven perspective, the structure Given [events] When [command] Then [event] fits very well :-) 30giovedì 23 maggio 13
  • 32. Takeaways Model of a complex enterprise system ignoring data ... what if data model is part of the problem? Tight focus on system behavior and not on static data structure. 32giovedì 23 maggio 13
  • 33. Takeaways The model is created collectively in a cooperative learning fashion and provides a good high-level view. Are you sure DEs know everything? Time-boxed, but.... Space-boxed but.... 33giovedì 23 maggio 13
  • 34. Legacy Systems The sketched model is close to an “ideal system model” It’s NOT the starting point to rewrite from scratch! But it’s a good reference to establish a direction Legacy components that do not belong in the domain emerge like accidental complexity. batch operations, legacy stuff feel really inappropriate. 34giovedì 23 maggio 13