SlideShare une entreprise Scribd logo
1  sur  27
Télécharger pour lire hors ligne
Rebuilding Legacy Apps
with Domain-Driven Design1
1
Lessons learned
Kacper Gunia
• Independent consultant at Domain Centric
• Helping companies to be successful with DDD
• @cakper / kacper@gunia.me
It’s important to remember that when you start from scratch there
is absolutely no reason to believe that you are going to do a
better job than you did the first time.
— Joel Spolsky
Not all of a large system will be well designed
— Eric Evans
Legacy strategies by Eric Evans
1. Bubble Context
2. Autonomous Bubble
3. Exposing Legacy assets as services
4. Event Streams
$ SET SOURCEFORMAT"FREE"
IDENTIFICATION DIVISION.
PROGRAM-ID. Iteration-If.
AUTHOR. Michael Coughlan.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 Num1 PIC 9 VALUE ZEROS.
01 Num2 PIC 9 VALUE ZEROS.
01 Result PIC 99 VALUE ZEROS.
01 Operator PIC X VALUE SPACE.
PROCEDURE DIVISION.
Calculator.
PERFORM 3 TIMES
DISPLAY "Enter First Number : " WITH NO ADVANCING
ACCEPT Num1
DISPLAY "Enter Second Number : " WITH NO ADVANCING
ACCEPT Num2
DISPLAY "Enter operator (+ or *) : " WITH NO ADVANCING
ACCEPT Operator
IF Operator = "+" THEN
ADD Num1, Num2 GIVING Result
END-IF
IF Operator = "*" THEN
MULTIPLY Num1 BY Num2 GIVING Result
END-IF
DISPLAY "Result is = ", Result
END-PERFORM.
STOP RUN.
Reasons to rebuild
• Lack of expertise
• Cost of maintenance is greater than
cost of rebuild + maintenance
• Change to a single component cascades through the
system
• Replacing off-the-shelf solution
Lessons Learned
Lesson 1:
Context Map
is your friend
Understand the big picture
• Non trivial systems never live in isolation
• Look for relationships and understand them well
• Find boundaries
• Look at cost of breaking / maintaining the relationship
• Make sure you understand the scope well
Integration groundwork
• Improve / change relationships that might be hard to maintain
• Do not rebuild and change interfaces at the same time
• Hedge contexts with Anti-Corruption Layers
• Work out non-functional requirements
• Make use of existing tests suites / write new
• Automate parallel validation
• Track progress
Lesson 2:
Follow the
Walking Skeleton
Be smart about the scope
• Avoid "Death by user stories" / feature shopping list
• Agree what the MVP / Walking Skeleton is and focus on it
• Goal is to prove that the team is able to deliver
• Show value to the business
• Call out unrealistic requirements
Impact Mapping2
2
https://www.impactmapping.org/
Lesson 3:
Do not ignore
Legacy Design
Design
• Make sure to have right people in the room
• Include Domain Experts, Legacy Developers, Business
• Make sure you understand well why rewrite is happening
• Focus on "what" not "how"
• Explore options / deliberate discovery 3
3
https://lizkeogh.com/2012/09/21/the-deliberate-discovery-workshop/
Design
• "Ubiquitous language" of legacy
• Language needs to evolve
• It's impossible to design a system without considering
technology
• Ensure good facilitation
Lesson 4:
Bounded Contexts
are not Microservices
Microservices
• Consistency as a driver
• Aggregates define consistency boundaries
• Consistency is defined by business, not developers!
• Where are good, old modules/packages
• Ports as deployable components
Lesson 5:
Event Sourcing:
beauty is only skin deep
Event Sourcing
• Sometimes make a lot of sense
• ES based model allowed us to simplify some complex
processes
• Projections make integration easy
• Start with really specific and reach events
• Separate aggregate state from apply and from handle
• Testing is explicit
Event Sourcing
• Lack of expertise / lesser known
• Event based integration
• Idempotency and delivery guarantees
• Eventual consistency
• Synchronous commands
• Migration of CRUD models
• Event stream housekeeping
Summary
• Find explicit boundaries of rewrite with Context Mapping
• Minimise number of changes at a time
• Use Walking Skeleton / MVP approach
• Learn from legacy designs but remember reasons for rebuild
• Base the design on Aggregate consistency
• Make sure you have good reason to use Event Sourcing
Thanks!
@cakper / kacper@gunia.me
References
• Domain-Driven Design: Tackling Complexity in the Heart of Software -
Eric Evans
• Getting started with DDD when surrounded by legacy systems - Eric
Evans
• Versioning in an Event Sourced System - Gregory Young
• Impact Mapping: Making a Big Impact with Software Products and
Projects - Gojko Adzic
• Graphic - own resource, Public Domain photos from pixabay.com, Impact
Mapping graphic from www.impactmapping.org

Contenu connexe

Tendances

Who needs containers in a serverless world
Who needs containers in a serverless worldWho needs containers in a serverless world
Who needs containers in a serverless world
Matthias Luebken
 

Tendances (20)

Containers & Cloud Native Ops Cloud Foundry Approach
Containers & Cloud Native Ops Cloud Foundry ApproachContainers & Cloud Native Ops Cloud Foundry Approach
Containers & Cloud Native Ops Cloud Foundry Approach
 
Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...
Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...
Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...
 
Serverless
ServerlessServerless
Serverless
 
Making it Easier to Contribute to Open Source Projects Using Docker Container...
Making it Easier to Contribute to Open Source Projects Using Docker Container...Making it Easier to Contribute to Open Source Projects Using Docker Container...
Making it Easier to Contribute to Open Source Projects Using Docker Container...
 
Containers and VMs and Clouds: Oh My. by Mike Coleman
Containers and VMs and Clouds: Oh My. by Mike ColemanContainers and VMs and Clouds: Oh My. by Mike Coleman
Containers and VMs and Clouds: Oh My. by Mike Coleman
 
ADDO 2020: "The past, present, and future of cloud native API gateways"
ADDO 2020: "The past, present, and future of cloud native API gateways"ADDO 2020: "The past, present, and future of cloud native API gateways"
ADDO 2020: "The past, present, and future of cloud native API gateways"
 
DockerCon SF 2015: Faster, Cheaper, Safer
DockerCon SF 2015: Faster, Cheaper, SaferDockerCon SF 2015: Faster, Cheaper, Safer
DockerCon SF 2015: Faster, Cheaper, Safer
 
Who needs containers in a serverless world
Who needs containers in a serverless worldWho needs containers in a serverless world
Who needs containers in a serverless world
 
Application Deployment and Management at Scale with 1&1 by Matt Baldwin
Application Deployment and Management at Scale with 1&1 by Matt BaldwinApplication Deployment and Management at Scale with 1&1 by Matt Baldwin
Application Deployment and Management at Scale with 1&1 by Matt Baldwin
 
DCSF19 Container Security: Theory & Practice at Netflix
DCSF19 Container Security: Theory & Practice at NetflixDCSF19 Container Security: Theory & Practice at Netflix
DCSF19 Container Security: Theory & Practice at Netflix
 
Building a Platform-as-a-Service with Docker and Node.js
Building a Platform-as-a-Service with Docker and Node.jsBuilding a Platform-as-a-Service with Docker and Node.js
Building a Platform-as-a-Service with Docker and Node.js
 
Docker in Production at the Aurora Team
Docker in Production at the Aurora TeamDocker in Production at the Aurora Team
Docker in Production at the Aurora Team
 
GOTOpia 2020: "The Past, Present, and Future of Cloud Native API Gateways"
GOTOpia 2020: "The Past, Present, and Future of Cloud Native API Gateways"GOTOpia 2020: "The Past, Present, and Future of Cloud Native API Gateways"
GOTOpia 2020: "The Past, Present, and Future of Cloud Native API Gateways"
 
Sebastien goasguen cloud stack and docker
Sebastien goasguen   cloud stack and dockerSebastien goasguen   cloud stack and docker
Sebastien goasguen cloud stack and docker
 
DCSF 19 Developing Apps with Containers, Functions and Cloud Services
DCSF 19 Developing Apps with Containers, Functions and Cloud ServicesDCSF 19 Developing Apps with Containers, Functions and Cloud Services
DCSF 19 Developing Apps with Containers, Functions and Cloud Services
 
Azure kubernetes service
Azure kubernetes serviceAzure kubernetes service
Azure kubernetes service
 
Autoscaling Docker Containers by Konstantinos Faliagkas, Docker Birthday #3 A...
Autoscaling Docker Containers by Konstantinos Faliagkas, Docker Birthday #3 A...Autoscaling Docker Containers by Konstantinos Faliagkas, Docker Birthday #3 A...
Autoscaling Docker Containers by Konstantinos Faliagkas, Docker Birthday #3 A...
 
Proof of Concept: Serverless with Swarm by Nirmal Mehta, Booz Allen Hamilton
Proof of Concept: Serverless with Swarm by Nirmal Mehta, Booz Allen Hamilton Proof of Concept: Serverless with Swarm by Nirmal Mehta, Booz Allen Hamilton
Proof of Concept: Serverless with Swarm by Nirmal Mehta, Booz Allen Hamilton
 
Build your own private Cloud environment
Build your own private Cloud environmentBuild your own private Cloud environment
Build your own private Cloud environment
 
Building a SaaS with Nodejs, Docker, and CoreOS
Building a SaaS with Nodejs, Docker, and CoreOSBuilding a SaaS with Nodejs, Docker, and CoreOS
Building a SaaS with Nodejs, Docker, and CoreOS
 

Similaire à Rebuilding Legacy Apps with Domain-Driven Design - Lessons learned

Arch factory - Agile Design: Best Practices
Arch factory - Agile Design: Best PracticesArch factory - Agile Design: Best Practices
Arch factory - Agile Design: Best Practices
Igor Moochnick
 
Twelve practices of XP_Se lect5 btech
Twelve practices of XP_Se lect5 btechTwelve practices of XP_Se lect5 btech
Twelve practices of XP_Se lect5 btech
IIITA
 
Final spiralmodel97
Final spiralmodel97Final spiralmodel97
Final spiralmodel97
akshay8835
 

Similaire à Rebuilding Legacy Apps with Domain-Driven Design - Lessons learned (20)

Cleaning Code - Tools and Techniques for Large Legacy Projects
Cleaning Code - Tools and Techniques for Large Legacy ProjectsCleaning Code - Tools and Techniques for Large Legacy Projects
Cleaning Code - Tools and Techniques for Large Legacy Projects
 
Lessons Learned From Cloud Migrations
Lessons Learned From Cloud MigrationsLessons Learned From Cloud Migrations
Lessons Learned From Cloud Migrations
 
Get lean tutorial
Get lean tutorialGet lean tutorial
Get lean tutorial
 
Project Sherpa: How RightScale Went All in on Docker
Project Sherpa: How RightScale Went All in on DockerProject Sherpa: How RightScale Went All in on Docker
Project Sherpa: How RightScale Went All in on Docker
 
Arch factory - Agile Design: Best Practices
Arch factory - Agile Design: Best PracticesArch factory - Agile Design: Best Practices
Arch factory - Agile Design: Best Practices
 
14 Habits of Great SQL Developers
14 Habits of Great SQL Developers14 Habits of Great SQL Developers
14 Habits of Great SQL Developers
 
It's XP, Stupid
It's XP, StupidIt's XP, Stupid
It's XP, Stupid
 
Twelve practices of XP_Se lect5 btech
Twelve practices of XP_Se lect5 btechTwelve practices of XP_Se lect5 btech
Twelve practices of XP_Se lect5 btech
 
Why We Need Architects (and Architecture) on Agile Projects
Why We Need Architects (and Architecture) on Agile ProjectsWhy We Need Architects (and Architecture) on Agile Projects
Why We Need Architects (and Architecture) on Agile Projects
 
Estimation Protips
Estimation ProtipsEstimation Protips
Estimation Protips
 
Final spiralmodel97
Final spiralmodel97Final spiralmodel97
Final spiralmodel97
 
Patterns and Antipatterns for Adopting IBM DevOps Tools
Patterns and Antipatterns for Adopting IBM DevOps ToolsPatterns and Antipatterns for Adopting IBM DevOps Tools
Patterns and Antipatterns for Adopting IBM DevOps Tools
 
Lessons Learned from Continuous Delivery
Lessons Learned from Continuous DeliveryLessons Learned from Continuous Delivery
Lessons Learned from Continuous Delivery
 
Estimation Protips - NCDevCon 2014
Estimation Protips - NCDevCon 2014Estimation Protips - NCDevCon 2014
Estimation Protips - NCDevCon 2014
 
Technical stories v1.2
Technical stories v1.2Technical stories v1.2
Technical stories v1.2
 
Clean code presentation
Clean code presentationClean code presentation
Clean code presentation
 
DrupalCon Austin: Planning for Performance
DrupalCon Austin: Planning for PerformanceDrupalCon Austin: Planning for Performance
DrupalCon Austin: Planning for Performance
 
UX in Action: IBM Watson
UX in Action: IBM WatsonUX in Action: IBM Watson
UX in Action: IBM Watson
 
A Proven Software Development Process for the Non Technical Founder
A Proven Software Development Process for the Non Technical FounderA Proven Software Development Process for the Non Technical Founder
A Proven Software Development Process for the Non Technical Founder
 
Lessons learned from applying Event sourcing and CQRS
Lessons learned from applying Event sourcing and CQRSLessons learned from applying Event sourcing and CQRS
Lessons learned from applying Event sourcing and CQRS
 

Plus de Kacper Gunia

Plus de Kacper Gunia (16)

How a large corporation used Domain-Driven Design to replace a loyalty system
How a large corporation used Domain-Driven Design to replace a loyalty systemHow a large corporation used Domain-Driven Design to replace a loyalty system
How a large corporation used Domain-Driven Design to replace a loyalty system
 
The IoC Hydra - Dutch PHP Conference 2016
The IoC Hydra - Dutch PHP Conference 2016The IoC Hydra - Dutch PHP Conference 2016
The IoC Hydra - Dutch PHP Conference 2016
 
The top 10 things that any pro PHP developer should be doing
The top 10 things that any pro PHP developer should be doingThe top 10 things that any pro PHP developer should be doing
The top 10 things that any pro PHP developer should be doing
 
Embrace Events and let CRUD die
Embrace Events and let CRUD dieEmbrace Events and let CRUD die
Embrace Events and let CRUD die
 
The IoC Hydra
The IoC HydraThe IoC Hydra
The IoC Hydra
 
Forget about Index.php and build you applications around HTTP - PHPers Cracow
Forget about Index.php and build you applications around HTTP - PHPers CracowForget about Index.php and build you applications around HTTP - PHPers Cracow
Forget about Index.php and build you applications around HTTP - PHPers Cracow
 
Domain-driven Design in PHP and Symfony - Drupal Camp Wroclaw!
Domain-driven Design in PHP and Symfony - Drupal Camp Wroclaw!Domain-driven Design in PHP and Symfony - Drupal Camp Wroclaw!
Domain-driven Design in PHP and Symfony - Drupal Camp Wroclaw!
 
OmniFocus - the #1 ‘Getting Things Done’ tool
OmniFocus - the #1 ‘Getting Things Done’ toolOmniFocus - the #1 ‘Getting Things Done’ tool
OmniFocus - the #1 ‘Getting Things Done’ tool
 
Scaling Symfony2 apps with RabbitMQ - Symfony UK Meetup
Scaling Symfony2 apps with RabbitMQ - Symfony UK MeetupScaling Symfony2 apps with RabbitMQ - Symfony UK Meetup
Scaling Symfony2 apps with RabbitMQ - Symfony UK Meetup
 
Forget about index.php and build you applications around HTTP!
Forget about index.php and build you applications around HTTP!Forget about index.php and build you applications around HTTP!
Forget about index.php and build you applications around HTTP!
 
Dutch PHP Conference - PHPSpec 2 - The only Design Tool you need
Dutch PHP Conference - PHPSpec 2 - The only Design Tool you needDutch PHP Conference - PHPSpec 2 - The only Design Tool you need
Dutch PHP Conference - PHPSpec 2 - The only Design Tool you need
 
PHPSpec - the only Design Tool you need - 4Developers
PHPSpec - the only Design Tool you need - 4DevelopersPHPSpec - the only Design Tool you need - 4Developers
PHPSpec - the only Design Tool you need - 4Developers
 
November Camp - Spec BDD with PHPSpec 2
November Camp - Spec BDD with PHPSpec 2November Camp - Spec BDD with PHPSpec 2
November Camp - Spec BDD with PHPSpec 2
 
Dependency Injection in PHP
Dependency Injection in PHPDependency Injection in PHP
Dependency Injection in PHP
 
Code Dojo
Code DojoCode Dojo
Code Dojo
 
SpecBDD in PHP
SpecBDD in PHPSpecBDD in PHP
SpecBDD in PHP
 

Dernier

%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 

Dernier (20)

%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 

Rebuilding Legacy Apps with Domain-Driven Design - Lessons learned

  • 1. Rebuilding Legacy Apps with Domain-Driven Design1 1 Lessons learned
  • 2. Kacper Gunia • Independent consultant at Domain Centric • Helping companies to be successful with DDD • @cakper / kacper@gunia.me
  • 3. It’s important to remember that when you start from scratch there is absolutely no reason to believe that you are going to do a better job than you did the first time. — Joel Spolsky
  • 4. Not all of a large system will be well designed — Eric Evans
  • 5. Legacy strategies by Eric Evans 1. Bubble Context 2. Autonomous Bubble 3. Exposing Legacy assets as services 4. Event Streams
  • 6. $ SET SOURCEFORMAT"FREE" IDENTIFICATION DIVISION. PROGRAM-ID. Iteration-If. AUTHOR. Michael Coughlan. DATA DIVISION. WORKING-STORAGE SECTION. 01 Num1 PIC 9 VALUE ZEROS. 01 Num2 PIC 9 VALUE ZEROS. 01 Result PIC 99 VALUE ZEROS. 01 Operator PIC X VALUE SPACE. PROCEDURE DIVISION. Calculator. PERFORM 3 TIMES DISPLAY "Enter First Number : " WITH NO ADVANCING ACCEPT Num1 DISPLAY "Enter Second Number : " WITH NO ADVANCING ACCEPT Num2 DISPLAY "Enter operator (+ or *) : " WITH NO ADVANCING ACCEPT Operator IF Operator = "+" THEN ADD Num1, Num2 GIVING Result END-IF IF Operator = "*" THEN MULTIPLY Num1 BY Num2 GIVING Result END-IF DISPLAY "Result is = ", Result END-PERFORM. STOP RUN.
  • 7. Reasons to rebuild • Lack of expertise • Cost of maintenance is greater than cost of rebuild + maintenance • Change to a single component cascades through the system • Replacing off-the-shelf solution
  • 10.
  • 11. Understand the big picture • Non trivial systems never live in isolation • Look for relationships and understand them well • Find boundaries • Look at cost of breaking / maintaining the relationship • Make sure you understand the scope well
  • 12.
  • 13. Integration groundwork • Improve / change relationships that might be hard to maintain • Do not rebuild and change interfaces at the same time • Hedge contexts with Anti-Corruption Layers • Work out non-functional requirements • Make use of existing tests suites / write new • Automate parallel validation • Track progress
  • 15. Be smart about the scope • Avoid "Death by user stories" / feature shopping list • Agree what the MVP / Walking Skeleton is and focus on it • Goal is to prove that the team is able to deliver • Show value to the business • Call out unrealistic requirements
  • 17. Lesson 3: Do not ignore Legacy Design
  • 18. Design • Make sure to have right people in the room • Include Domain Experts, Legacy Developers, Business • Make sure you understand well why rewrite is happening • Focus on "what" not "how" • Explore options / deliberate discovery 3 3 https://lizkeogh.com/2012/09/21/the-deliberate-discovery-workshop/
  • 19. Design • "Ubiquitous language" of legacy • Language needs to evolve • It's impossible to design a system without considering technology • Ensure good facilitation
  • 20. Lesson 4: Bounded Contexts are not Microservices
  • 21. Microservices • Consistency as a driver • Aggregates define consistency boundaries • Consistency is defined by business, not developers! • Where are good, old modules/packages • Ports as deployable components
  • 22. Lesson 5: Event Sourcing: beauty is only skin deep
  • 23. Event Sourcing • Sometimes make a lot of sense • ES based model allowed us to simplify some complex processes • Projections make integration easy • Start with really specific and reach events • Separate aggregate state from apply and from handle • Testing is explicit
  • 24. Event Sourcing • Lack of expertise / lesser known • Event based integration • Idempotency and delivery guarantees • Eventual consistency • Synchronous commands • Migration of CRUD models • Event stream housekeeping
  • 25. Summary • Find explicit boundaries of rewrite with Context Mapping • Minimise number of changes at a time • Use Walking Skeleton / MVP approach • Learn from legacy designs but remember reasons for rebuild • Base the design on Aggregate consistency • Make sure you have good reason to use Event Sourcing
  • 27. References • Domain-Driven Design: Tackling Complexity in the Heart of Software - Eric Evans • Getting started with DDD when surrounded by legacy systems - Eric Evans • Versioning in an Event Sourced System - Gregory Young • Impact Mapping: Making a Big Impact with Software Products and Projects - Gojko Adzic • Graphic - own resource, Public Domain photos from pixabay.com, Impact Mapping graphic from www.impactmapping.org