f you’re a software developer or architect who wants to play a more influential role in ensuring your software systems are optimised to support business goals, then you need to learn about the benefits and techniques of modern strategic domain-driven design.
Many people think that DDD is about software design patterns, but that’s only a small part, and the least important part of DDD. In fact, Eric Evans wishes he’d focused more on the strategic aspects of DDD in his famous book (Domain-Driven Design: Tackling Complexity in the Heart of Software) and pushed the tactical coding patterns to the back!
Strategic domain-driven design is about truly understanding the business domain. It involves collaboratively modelling business processes using advanced modelling techniques, like Event Storming and Domain Storytelling, with domain experts on an ongoing basis.
One of the core outcomes of strategic DDD is identifying cohesive modules, known as bounded context. Bounded contexts help you to create a maintainable, comprehensible codebase by isolating dependencies and delineating concepts that reference different classes of business value.
In this talk, you’ll see many of the most effective bounded context design heuristics, recurring patterns in the wild, and you’ll learn how to facilitate those vital modelling sessions so you can lead the adoption of strategic DDD in your organisation.
More details:
https://confengine.com/agile-india-2019/proposal/8100/strategic-domain-driven-design
Conference link: https://2019.agileindia.org
4. ntcoding
“Can’t you just add a text box?”
Website
Digital Enterprise IT
Business
APIs
Data
APIs
Rules,
BPM,
ESB
Back
Office
Website
Website
5. ntcoding
“A loosely coupled software
architecture and org structure to
match” is a key predictor of:
1. Continuous Delivery Performance
2. Ability to scale org and increase
performance linearly
6. “
ntcoding
[In our study at Thoughtworks we
found] work takes an order of
magnitude longer when it leaves a
team.
— James Lewis (@boicy)
7. ntcoding
STRUCTURAL ISSUES ARE A TOP
HURDLE TO MEETING DIGITAL GOALS
https://www.mckinsey.com/business-functions/digital-mckinsey/our-insights/the-digital-tipping-point-mckinsey-global-survey-results
8. ntcoding
How do we design
sociotechnical systems
(software and teams) to
maximise iteration quality
and speed?
9. “
ntcoding
the key to incremental architecture is
to build on a framework that can
accommodate change… that
framework is the domain.… By
modeling the domain, you can more
easily handle changes to the domain
— Allen Holub (@allenholub)
11. ntcoding
“How hard can it be?”
https://segment.com/blog/goodbye-microservices/
Service boundaries
causing barriers
…This led to developers
complaining of their service being
blocked by tasks on other
services and refusing to help out
by working with these blocking
tasks…
15. ntcoding
IS TOMATO FRUIT OR VEGETABLE?
Tomato is a fruit!
Scientifically, it
matches the
botanical definition
of a fruit.
?
VegetablesFruits
🍏
🍌
🍓 🥕🥦
🥔
16. “
ntcoding
The U.S. Supreme Court ruled in 1893 in the
case Nix v. Hedden that tomatoes count as
vegetables — despite the botanical fact
that they're fruits.
...a tariff was put in place to protect domestic
vegetable growers by taxing imported
vegetables.
https://www.goodhousekeeping.com/home/gardening/a20705757/are-tomatoes-legally-a-vegetable/
18. ntcoding
DOMAIN MODELLING FUNDAMENTALS
1. Many ways to model every domain
2. ‘Obvious’ models can be wrong
3. Context defines utility of model
4. Language is contextual
19. ntcoding
STRATEGIC DOMAIN-DRIVEN DESIGN
Find bounded contexts - independent parts
of the domain.
Look for parts of the domain where
language has specialised meaning
(e.g. tomato) to identify bounded contexts.
27. ntcoding
EXPLORING BOUNDARIES WITH
EVENT STORMING
Alberto Brandolini: Discovering Bounded Contexts with Event Storming
Published in: DDD The First 15 Years (Leanpub)
33. ntcoding
Decouple high value and low
value parts of the system to
maximise iteration speed
where ROI potential is
greatest.
34. ntcoding
BOUNDED CONTEXT DESIGN HEURISTIC
2. ALIGN WITH VALUE
Tier 3
Products
(core)
Financial
Advice
(supportive) Payments
(generic)
35. ntcoding
BOUNDED CONTEXT DESIGN HEURISTIC
3. OPTIMISE FOR SOCIAL NEEDS
Design systems so that the people
building them are motivated and
productive.
✅ Purpose ✅ Autonomy ✅ Mastery
36. ntcoding
SOCIAL COMPLEXITY & COGNITIVE LOAD
If teams are too small, the chance of
dependencies between teams will be
greater.
If teams are too big, social complexity will
lead to burn out.
37. ntcoding
BOUNDED CONTEXT DESIGN HEURISTIC
4. RESPECT TECHNICAL CONSTRAINTS
DDD does not mean ignoring
technical concerns and creating
pretty models.
Technical concerns should influence
your bounded contexts.
39. ntcoding
BOUNDED CONTEXT DESIGN HEURISTIC
5. DON’T IGNORE THE UX
UI UIUI
API API API
UI
API API API
Greater autonomy can result in a fractured user experience
40. ntcoding
5 KEY HEURISTICS
1. Align with domain language
2. Align with business value
3. Optimise for social needs
4. Respect technical constraints
5. Don’t ignore the UX
41. ntcoding
STRATEGIC DESIGN SCORECARD
This is a hypothetical illustration. The scores will
differ in different domains and organisations.
Assess your bounded
contexts against the 5
primary criteria for defining
boundaries.
43. ntcoding
PATTERNS
Useful
Apply learnings from one
situation to another
A starting point
Develop analytical mindset to
identify design trade-offs in
any situation
A shared language for
discussing similar challenges
Dangerous
No two situations are ever
exactly the same
A complete solution
Develop lazy mindset of just
using what worked before
without thinking
We think we’re talking about
the same thing but we aren’t
56. ntcoding
BRAIN CONTEXT
• Sucks logic from other contexts
• Other contexts become tightly coupled
• High rate of co-change
• Teams coupled + politics
• Not always an anti-pattern
68. ntcoding
Bounded contexts will always
have dependencies.
Relationship patterns help us
choose the most effective
collaboration approaches.
69. ntcoding
CLASSIC DDD RELATIONSHIP PATTERNS
Shared Kernel Customer
Supplier
Open Host
Service
Conformist
OH
SK
C
S
🤝
Each pattern has technical and social/political characteristics
Anti-
corruption
Layer
ACL
70. ntcoding
MODERN RELATIONSHIP PATTERNS
1. Inner Sourcing (internal open source model)
2. People rotation (temporary move to another team)
3. Sub-teams (fluid smaller teams within larger team)
4. Partnership Patterns (ways to group teams)
5. Alliance Teams (temporary new teams)
74. ntcoding
ALLIANCE TEAMS
New ad platform
alliance
Campaign
Build
Campaign
Management
Temporary teams formed to solve a shared common goal
Campaign
Analytics