What happens when you have the luxury of leading software projects without trade-offs and you're a Domain-Driven Design fanatic? You start stretching DDD concepts until it hurts and make experiments un uncharted territory.
In this talk, we'll see a few unconventional approached to Context Mapping and what happens when you fully embrace CQRS and Small Aggregates as a modeling paradigm.
2. About me
• Coding since 1982
• Into Domain-Driven Design since 2005
• running www.avanscoperta.it
• Modelling (almost) everything with sticky notes, markers
and a paper roll.
• Calling this stuff
15. Contexts on a Grid
What to do when you have too many business lines?
16. Practice:
Small company (5 people core - about 20 partners)
Many Business Lines
🤔 No departments or Roles to look at
😊 EventStorming as a common practice
🙄 But only on a few Business Lines
😏 …writing specific & General Purpose code.
22. Bounded Contexts on a grid
🙂 Shapes and Distribution
Matters
🧐 Commonalities are
visible
🧐 More precise names &
purposes
😎 Better project
structure in the IDE
23. On a single business line…
It’s a value creation network!
24. Contexts on a Stack
Too much domain expertise can be a problem
25. New Scenario
Larger and more mature organization(s)
Building sophisticated services on top of in-house
technology
Platform services available, but really complex
26. A small context map…
Apparently
Enough Bandwidth
to support
collaboration
Still High Value
Services are
locked in
Conformist mode
!
38. 💡 Fairytale programming
“Coding against the system I wish I had”
Design your APIs according to your current needs
In an ACL implement mapping according to what you’re
given.
Goal: “Maximise Ignorance about the underlying
complexity”
43. Is it the same thing?
• GUI elements need to be aligned with the
user mental model
• “Call To Action” is designed to be catchy
• Underlying commands need to be precise,
and tend to follow local symmetries (like
CalculateFee / FeeCalculated)
Send Money
48. A flattened
simplified language,
throughout the
whole experience
Local languages
with a deeper
understanding of
the complexity
Some terms are
obviously the same
(but some may
differ)
49. Customer Journey as a BC
Customer Language
DESIGNED (engagement, simplicity, mental model, AB
testing)
FLAT (we don’t want to teach DDD to our users)
Proxy stakeholders (for many reasons)
Server Language(s)
Real Stakeholders & Departments
Emerging and Evolving (driven by purpose)
52. CQRS as if you mean it
What you see is just an illusion
53. Still my company…
Public Training Classes - Before the virus 🦠
🙂 Selling tickets online, obvious stuff…
😨 Class, Public and Event are relevant terms in our
domain.
54. We eventStormed a little…
Ticket Sold Registration Policy Register
Attendee
Public Training
Edition
Attendee
Registered
55.
56. Read Model
Confirm Retire
Amazing Workshop
With John Doe
June 25 - 2020
90 days till deadline
5 of 16 ticket sold
UNCONFIRMED
Threshold at 8
- John Smith - Early Bird Ticket
- Mario Rossi - Early Bird Ticket
- Francesca Bianchi - Early Bird Ticket
- Sylvie Bouchard - Standard Ticket
- Nick Fury - Special Ticket
The information needed to
make a decision
A few things are
missing, I am lazy
58. Rules
Scheduling a Training Class allows registration
Can’t sell more Tickets than the given capacity
Can’t register participants after the sales closed
Reaching threshold allows to confirm the training class
Class confirmation triggers a message to the attendees
Public Training
Edition
Piece of cake!
60. Other rules
Some seats can be reserved before the class goes public
Sales can happen on the phone too.
Some last minute changes are still possible.
We’d like to check messages before they’re sent.
Ouch!
61. This is where people lie
Current rules are not carved in stone: they’re then
best trade off between the state of the organisation
and the market.
They’re both going to change.
Maybe they already did.
Policy
62. #protip
Validate your Policies with “Always” and “Immediately”
to make sure rules are not “rules” - (You have to
speak and sound stupid to make it really work).
68. Too many moving parts?
Public Training
Event
Schedule
Public
Edition
Scheduled Default
Registration
Policy
Open
Registration Training Class
Registration
Opened
69. We need some Glue
Whenever a public training class is
scheduled, we open registration.
Default Registration
Policy
Private Sales
Scheduling Policy
Sales can be opened before a training
class goes public.
70. Some more options
Whenever we reach the Threshold we
notify the registered attendees of the
confirmation
Training
Confirmation Policy
Whenever we cancel a training class we
prepare a cancellation E-mail with
personalised options.
Orga
nizer
Training Cancellation
Policy
Orga
nizer
74. Read Model
Confirm Retire
Amazing Workshop
With John Doe
June 25 - 2020
90 days till deadline
5 of 16 ticket sold
UNCONFIRMED
Threshold at 8
- John Smith - Early Bird Ticket
- Mario Rossi - Early Bird Ticket
- Francesca Bianchi - Early Bird Ticket
- Sylvie Bouchard - Standard Ticket
- Nick Fury - Special Ticket
The information needed to
make a decision Planning
Registration
Sales
Product
Design
83. Extreme Read Model
What a user need to see in order to take given
decisions
…according to the mental model of the user
Tailored on user needs
Tailored on user perception
Confirm
85. Extreme Context Mapping
💡 Bounded Contexts on a Business Grid
💡 Bounded Contexts on a stack
💡 Customer Journey as a Separate Bounded Context
Bounded Context
86. Policies as Glue
This is where you want to implement flexibility
This is where users often want still to have control
I am more interested in shaping the conversation than
constraining implementation.
Policy