How a large corporation used
Domain-Driven Design
to replace a loyalty system
Kacper Gunia
Independent consultant & Trainer
DomainCentric.net
@ddd_london
@cakper
The Rescue Mission
@cakper
The backlog
@cakper
Event Storming
@cakper
Microservices
@cakper
Suboptimal boundaries
@cakper
Teams distributed
across the globe
@cakper
New and shiny
technologies
@cakper
Skill Gap
@cakper
So what did
we learn?
@cakper
Let people learn
and make mistakes
@cakper
Facilitate learning
→ Practice deliberately
→ Vary the assignments
→ Give access to resources
→ Explore solutions, show options
→ Collaborate, evaluate and conclude
@cakper
Increase throughput and
reduce work in progress
@cakper
Work with Conway's law
@cakper
Technology is cool
@cakper
Delivering value is cooler
@cakper
Functional programming
is just a tool
@cakper
Find helpful boundaries
@cakper
It didn't
matter!
@cakper
Can we deliver software?
@cakper
Hell Yes!
@cakper
The Legacy Rewrite
@cakper
Legacy is great!
@cakper
Context Map
@cakper
C4 Model: System Context Diagram1
1 
Simon Brown, https://c4model.com/
Big Picture Event Storming
@cakper
Ubiquitous Langugage
of legacy
@cakper
Impact Mapping 2
2 
Gojko Adzic, https://www.impactmapping.org/
Story mapping3
3 
https://manifesto.co.uk/user-story-mapping/
Design Level Event Storming4
4 
Alberto Brandolini, Introducing EventStorming
Prototype it!
@cakper
Model Exploration Whirlpool5
5 
Eric Evans, http://domainlanguage.com/ddd/whirlpool/
Leverage existing
specs and tests
@cakper
Consider both technical
and social constraints
@cakper
Constantly monitor and
evaluate your choices
@cakper
Consistency is
a business problem
@cakper
Microservices
@cakper
Event Sourcing
@cakper
Learning curve
@cakper
Events are explicit
@cakper
Data migration
@cakper
Projections
@cakper
Testing
@cakper
Living Documentation
@cakper
Design for replayability
@cakper
(Do not)
Roll your own
Event Store
@cakper
Summary
→ Legacy is a source of requirements, not design
→ Use strategic patterns to understand the system
→ Create and evolve tactical design iteratively
→ Monitor the sociotechnical architectrue
@cakper
Thank you!
Training: Strategic DDD
& Sociotechnical Architecture
NYC 18th - 19th November 2019
@cakper / DomainCentric.net

How a large corporation used Domain-Driven Design to replace a loyalty system