SlideShare a Scribd company logo
1 of 55
© 2015 Nunsys
Refactoring long-living legacy applications
Manuel Alagarda Esteve
© 2015 Nunsys
A few things about me
Jorge Capel Planells
Consultor Business Software at NUNSYS
Jorge.capel@nunsys.com
@jcapelplanells
© 2015 Nunsys
The Life path of a long-living application
Una evolución poco sostenible hoy, un sistema inviable mañana.
Infeasibility Stage
Sibylle Peter, Sven Ehrke, Canoo Engineering AG, www.canoo.com
http://www.methodsandtools.com/archive/archive.php?id=98
Do you have a legacy application problem?
• Are you working in a critical application for your business or Company?
• Does your company grow faster than your application?
• Is your application able to achieve business goals in time?
• Do you spend a lot of time and effort working in a new feature?
• Could a simple change take weeks?
• Do you invest a lot of time and effort fixing bugs?
• Do you have a safety net of automated regression tests ?
• Deliver a new version makes your heart sink?
Yes, you have a problem
Infeasibility application
….hero work
Why do you have a legacy problem?
© 2015 Nunsys
Refactor or Rewrite??
Factores en los que nos basamos para tomar a esta decisión
Refactoring
“Refactoring is the process of changing a software system in such a way that it does not alter the
external behavior of the code yet improves its internal structure.”
Refactoring: Improving the Design of Existing Code
Martin Fowler
Key factors
1 Time to market
2 Continuous changes
3 Techical debt
4 Application size
5 Complexity
6 Cost of application redesign
Refactor or Rewrite??
Technical debt
Changes
Time-to-market
Size
Complex
Cost new application
Refactor o Rewrite?
REESCRIBIR
High technical debt
Low cost of new application
REWRITE
Technical debt 9
Changes 9
Time-to-market 10
Size 1
Complex 1
Cost of new application 3
Refactor or Rewrite?
Technical debt
Changes
Time-to-market
Size
Complexity
Cost of new application
Refactor o rewrite?
REFACTOR
Always refactor with low
technical debt
Technical debt 2
Changes 9
Time-to-market 10
Size 7
Complex 8
Cost of new application 8
Refactor or Rewrite?
Technical debt
Changes
Time-to-market
Size
Complex
Cost of new application
Refactor or Rewrite?
Very high Technical debt
Low changes
Technical debt 8
Changes 2
Time-to-market 2
Size 5
Complex 5
Cost of new application 5
Refactor or Rewrite?
Technical debt
Changes
Time-to-market
Size
Complex
Cost of new application
Refactor or Rewrite?
REFACTOR
Technical debt 6
Changes 10
Time-to-market 10
Size 10
Complex 8
Cost of new application 10
© 2015 Nunsys
Case study
Técnicas especificas de un proyecto de refactorización
o Multinational car rental company located in 8 countries
o With its own IT departament and development team
o This team maintains and develops Company’s software
assets
o Software asset under study is a desktop application
 8 years old
 Aprox. 3,000,000 lines of code
 Installed in 200 Workstation
 300 users
A case study
o Deliver new functionality to production every 2 weeks
o Plenty of showstopper bugs in production
o At least two hotfixes for each release
o We spend at least 20 percent of our time each iteration fixing production bugs
o High time to market
o High risk of failure. High cost of defects
o No automated tests
o No testing process
State
© 2015 Nunsys
Prerequisites for succesful Refactoring Projects
Condiciones y tareas previas requeridas para poder dar comienzo con un proyecto de
refactorización
Management support
Management support is vital to success
• Understand the value of investing in legacy systems is difficult.
• We have to invest more time and money in an application that after all
it works as required
• It’s an opportunity to explain what improvements can help your
business achieve.
Numbers - ROI
0
5000
10000
15000
20000
25000
30000
0 50 100 150 200 250 300 350 400 450
Cost
Features
Total cost per features
No refactor Refactoring Rewrite
Cost
Refactoring 5.000
Rewrite 15.000
Cost/Feauture
Without
Refactor 60
Refactoring 30
Rewrite 10
Refactoring master plan
ASSESSMENT PERIOD
•Investigate the reasons for the deteriorated state of the application
•Identify differentiators areas that constantly change
•Identify differentiators areas that are critical for business achieve
•Identify areas that changes are expensive
Refactoring master plan
GOALS
•A clear separation between layers
•Clean up the presentation layer
•Replace GUI framework
Refactoring master plan
METRICS
• Quality KPI’s(Technical debt, cyclomatic complexity,cohesion,…)
• Tools: Sonar, Understand,…
Define own KPI’s
•Cost per feature
•Cost per defect
•DRE (Defect removal efficiency)
Team
Trained and experienced
professionals
…and with the resources
needed
Iterative and incremental development
Project must have its own team refactoring “Refactor team”
“Refactor team” must not develop new features
PREPARATORY PHASE IMPLEMENTATION PHASE
User
cases
Master
Plan
Design Parallel Tests
tool
Iteration 0
Analysis Refactor Refactor P.T
Validaton Iteraction 1
Analysis Refactor Refactor PP
Validation Iteration n
Analysis Refactor Refactor PP
Validación
Version control and continuos integration
RELEASE
REFACTORING
trunk
RAMA FUNCIONALIDAD NUEVA
Versión probadaTested version
New feature branch
Custom framework and working method
•Standard development guide
–SOLID
–CLEAN CODE
•Define application architecture
•Use adequate technologies
•Use frameworks
Test automation
• Automate more critical user cases with Functional GUI Testing
automation
• Parallel testing “Pruebas paralelas”
© 2015 Nunsys
Main problems
Técnicas especificas de un proyecto de refactorización
© 2015 Nunsys
How can I extract the knowledge?
Reverse engineering
Reverse engineering
Flow diagrams
© 2015 Nunsys
Where should I Start?
Mikado Method
Technique used to identify and to plan
refactoring tasks
Mikado Method
Let’s do it
Our process
© 2015 Nunsys
I can´t do it in only one iteration
I can´t do it in only one iteration
Branch by abstraction
Starting point
?????
Final implementation
© 2015 Nunsys
I’ Cant test the legacy application
© 2015 Nunsys
Testing legacy applications
Evitar errores mediante la automatización de pruebas
Parallel Testing
• It’s an “integration test” that runs twice with differents versions
• Reference version (code before refactoring)
• Refactor version (code after refactoring)
• Test must be designed to execute a critical process against a high data volumen.
Test must cover all critical paths
• Two executions are independents and each one access to a identical DB.
• Finally DBs are compared in order to look for differences
Parallel Testing
Parallel Testing
Which version is our reference?
RELEASE
REFACTORING
trunk
RAMA FUNCIONALIDAD NUEVA
Versión probadaTested version
New feature branch
Functional GUI Testing automation
https://www.youtube.com/watch?v=JzAvIrk6uVI
https://www.youtube.com/watch?v=ciDVHebNphc&list=PLEB
B611A728FE430E
Demostración
More info about refactoring
 Refactoring: Improving the Design of Existing Code – Martin Fowler
 Working Efectivelly with Legacy Code - Michael Feathers
 https://sourcemaking.com/refactoring
Presentation refactoring large legacy applications

More Related Content

What's hot

Software Measurement: Lecture 1. Measures and Metrics
Software Measurement: Lecture 1. Measures and MetricsSoftware Measurement: Lecture 1. Measures and Metrics
Software Measurement: Lecture 1. Measures and MetricsProgrameter
 
Mise en place d'une solution du supérvision réseau
Mise en place d'une solution du supérvision réseauMise en place d'une solution du supérvision réseau
Mise en place d'une solution du supérvision réseauRabeb Boumaiza
 
Software Metrics - Software Engineering
Software Metrics - Software EngineeringSoftware Metrics - Software Engineering
Software Metrics - Software EngineeringDrishti Bhalla
 
UML Case Tools
UML Case ToolsUML Case Tools
UML Case ToolsAshesh R
 
Méthodologie 2 Track Unified Process
Méthodologie 2 Track Unified ProcessMéthodologie 2 Track Unified Process
Méthodologie 2 Track Unified ProcessZakaria Bouazza
 
Développement de modules pour odoo (anciennement OpenERP): exemples et exerci...
Développement de modules pour odoo (anciennement OpenERP): exemples et exerci...Développement de modules pour odoo (anciennement OpenERP): exemples et exerci...
Développement de modules pour odoo (anciennement OpenERP): exemples et exerci...Abdelouahed Abdou
 
Reconnaissance faciale
Reconnaissance facialeReconnaissance faciale
Reconnaissance facialeAymen Fodda
 
ETUDE ET MISE EN PLACE D'UNE SOLUTION DE CLOUD COMPUTING PRIVÉ BASÉE SUR UN ...
ETUDE ET MISE EN PLACE D'UNE SOLUTION DE CLOUD COMPUTING  PRIVÉ BASÉE SUR UN ...ETUDE ET MISE EN PLACE D'UNE SOLUTION DE CLOUD COMPUTING  PRIVÉ BASÉE SUR UN ...
ETUDE ET MISE EN PLACE D'UNE SOLUTION DE CLOUD COMPUTING PRIVÉ BASÉE SUR UN ...Borel NZOGANG
 
Pour Écrire un Bon Rapport en Informatique
Pour Écrire un Bon Rapport en InformatiquePour Écrire un Bon Rapport en Informatique
Pour Écrire un Bon Rapport en InformatiqueLilia Sfaxi
 
pfe Conception et Réalisation d’un Portail WEB D’Evaluation Des Performance d...
pfe Conception et Réalisation d’un Portail WEB D’Evaluation Des Performance d...pfe Conception et Réalisation d’un Portail WEB D’Evaluation Des Performance d...
pfe Conception et Réalisation d’un Portail WEB D’Evaluation Des Performance d...Ben Messaoud Aymen
 
Software archiecture lecture09
Software archiecture   lecture09Software archiecture   lecture09
Software archiecture lecture09Luktalja
 
Gestion d’un projet informatique
Gestion d’un projet informatiqueGestion d’un projet informatique
Gestion d’un projet informatiqueAymen Foudhaili
 
Bbp change impact analysis sample_2009_v07
Bbp change impact analysis sample_2009_v07Bbp change impact analysis sample_2009_v07
Bbp change impact analysis sample_2009_v07Muhammad_Abdelgawad
 
Introduction au génie logiciel
Introduction au génie logicielIntroduction au génie logiciel
Introduction au génie logicielMohamed Diallo
 
LES SYSTEMES DE GESTION DES IDENTITES ET DES ACCES : MISE EN ŒUVRE ET APPORT ...
LES SYSTEMES DE GESTION DES IDENTITES ET DES ACCES : MISE EN ŒUVRE ET APPORT ...LES SYSTEMES DE GESTION DES IDENTITES ET DES ACCES : MISE EN ŒUVRE ET APPORT ...
LES SYSTEMES DE GESTION DES IDENTITES ET DES ACCES : MISE EN ŒUVRE ET APPORT ...Danny Batomen Yanga
 
Gestion des emprunts dans une bibliothèque by le gang à lunettes
Gestion des emprunts dans une bibliothèque by le gang à lunettesGestion des emprunts dans une bibliothèque by le gang à lunettes
Gestion des emprunts dans une bibliothèque by le gang à lunettesCléa Aurianne Leencé BAWE
 

What's hot (20)

Software Measurement: Lecture 1. Measures and Metrics
Software Measurement: Lecture 1. Measures and MetricsSoftware Measurement: Lecture 1. Measures and Metrics
Software Measurement: Lecture 1. Measures and Metrics
 
SOP - Master
SOP - MasterSOP - Master
SOP - Master
 
Mise en place d'une solution du supérvision réseau
Mise en place d'une solution du supérvision réseauMise en place d'une solution du supérvision réseau
Mise en place d'une solution du supérvision réseau
 
Software Metrics - Software Engineering
Software Metrics - Software EngineeringSoftware Metrics - Software Engineering
Software Metrics - Software Engineering
 
UML Case Tools
UML Case ToolsUML Case Tools
UML Case Tools
 
Méthodologie 2 Track Unified Process
Méthodologie 2 Track Unified ProcessMéthodologie 2 Track Unified Process
Méthodologie 2 Track Unified Process
 
Développement de modules pour odoo (anciennement OpenERP): exemples et exerci...
Développement de modules pour odoo (anciennement OpenERP): exemples et exerci...Développement de modules pour odoo (anciennement OpenERP): exemples et exerci...
Développement de modules pour odoo (anciennement OpenERP): exemples et exerci...
 
Reconnaissance faciale
Reconnaissance facialeReconnaissance faciale
Reconnaissance faciale
 
Rapport
RapportRapport
Rapport
 
ETUDE ET MISE EN PLACE D'UNE SOLUTION DE CLOUD COMPUTING PRIVÉ BASÉE SUR UN ...
ETUDE ET MISE EN PLACE D'UNE SOLUTION DE CLOUD COMPUTING  PRIVÉ BASÉE SUR UN ...ETUDE ET MISE EN PLACE D'UNE SOLUTION DE CLOUD COMPUTING  PRIVÉ BASÉE SUR UN ...
ETUDE ET MISE EN PLACE D'UNE SOLUTION DE CLOUD COMPUTING PRIVÉ BASÉE SUR UN ...
 
Pour Écrire un Bon Rapport en Informatique
Pour Écrire un Bon Rapport en InformatiquePour Écrire un Bon Rapport en Informatique
Pour Écrire un Bon Rapport en Informatique
 
pfe Conception et Réalisation d’un Portail WEB D’Evaluation Des Performance d...
pfe Conception et Réalisation d’un Portail WEB D’Evaluation Des Performance d...pfe Conception et Réalisation d’un Portail WEB D’Evaluation Des Performance d...
pfe Conception et Réalisation d’un Portail WEB D’Evaluation Des Performance d...
 
Software archiecture lecture09
Software archiecture   lecture09Software archiecture   lecture09
Software archiecture lecture09
 
Gestion d’un projet informatique
Gestion d’un projet informatiqueGestion d’un projet informatique
Gestion d’un projet informatique
 
Bbp change impact analysis sample_2009_v07
Bbp change impact analysis sample_2009_v07Bbp change impact analysis sample_2009_v07
Bbp change impact analysis sample_2009_v07
 
Open ERP
Open ERPOpen ERP
Open ERP
 
PCA vs LDA
PCA vs LDAPCA vs LDA
PCA vs LDA
 
Introduction au génie logiciel
Introduction au génie logicielIntroduction au génie logiciel
Introduction au génie logiciel
 
LES SYSTEMES DE GESTION DES IDENTITES ET DES ACCES : MISE EN ŒUVRE ET APPORT ...
LES SYSTEMES DE GESTION DES IDENTITES ET DES ACCES : MISE EN ŒUVRE ET APPORT ...LES SYSTEMES DE GESTION DES IDENTITES ET DES ACCES : MISE EN ŒUVRE ET APPORT ...
LES SYSTEMES DE GESTION DES IDENTITES ET DES ACCES : MISE EN ŒUVRE ET APPORT ...
 
Gestion des emprunts dans une bibliothèque by le gang à lunettes
Gestion des emprunts dans une bibliothèque by le gang à lunettesGestion des emprunts dans une bibliothèque by le gang à lunettes
Gestion des emprunts dans une bibliothèque by le gang à lunettes
 

Similar to Presentation refactoring large legacy applications

Next Generation IT Delivery - What it means to deliver atthe speed of the Dig...
Next Generation IT Delivery - What it means to deliver atthe speed of the Dig...Next Generation IT Delivery - What it means to deliver atthe speed of the Dig...
Next Generation IT Delivery - What it means to deliver atthe speed of the Dig...Mirco Hering
 
Sgin2013 scrum accomplished-industrialagilecasestudy-avinashrao
Sgin2013 scrum accomplished-industrialagilecasestudy-avinashraoSgin2013 scrum accomplished-industrialagilecasestudy-avinashrao
Sgin2013 scrum accomplished-industrialagilecasestudy-avinashraoIndia Scrum Enthusiasts Community
 
Extending and improving bps romania 30th of nov 2010
Extending and improving bps   romania 30th of nov 2010Extending and improving bps   romania 30th of nov 2010
Extending and improving bps romania 30th of nov 2010Doina Draganescu
 
How Oceanwide Accelerated its DevOps Adoption Journey with AppDynamics - AppS...
How Oceanwide Accelerated its DevOps Adoption Journey with AppDynamics - AppS...How Oceanwide Accelerated its DevOps Adoption Journey with AppDynamics - AppS...
How Oceanwide Accelerated its DevOps Adoption Journey with AppDynamics - AppS...AppDynamics
 
Modernize Siebel CRM with Open UI
Modernize Siebel CRM with Open UIModernize Siebel CRM with Open UI
Modernize Siebel CRM with Open UIPerficient, Inc.
 
Live Webinar- Making Test Automation 10x Faster for Continuous Delivery- By R...
Live Webinar- Making Test Automation 10x Faster for Continuous Delivery- By R...Live Webinar- Making Test Automation 10x Faster for Continuous Delivery- By R...
Live Webinar- Making Test Automation 10x Faster for Continuous Delivery- By R...RapidValue
 
Enterprise DevOps Transformation
Enterprise DevOps TransformationEnterprise DevOps Transformation
Enterprise DevOps TransformationBart Driscoll
 
DevOps in the Hybrid Cloud
DevOps in the Hybrid CloudDevOps in the Hybrid Cloud
DevOps in the Hybrid CloudRichard Irving
 
Leonard Munyua, CIO at Simba Corporation - Legacy modernisation and adequate ...
Leonard Munyua, CIO at Simba Corporation - Legacy modernisation and adequate ...Leonard Munyua, CIO at Simba Corporation - Legacy modernisation and adequate ...
Leonard Munyua, CIO at Simba Corporation - Legacy modernisation and adequate ...Global Business Events
 
Performance Testing in the Agile Lifecycle
Performance Testing in the Agile LifecyclePerformance Testing in the Agile Lifecycle
Performance Testing in the Agile LifecycleLee Barnes
 
Moving Applications to the cloud
Moving Applications to the cloudMoving Applications to the cloud
Moving Applications to the cloudAarno Aukia
 
[Customizable Template] How to Get Stakeholder Buy-In for a Toolchain Integra...
[Customizable Template] How to Get Stakeholder Buy-In for a Toolchain Integra...[Customizable Template] How to Get Stakeholder Buy-In for a Toolchain Integra...
[Customizable Template] How to Get Stakeholder Buy-In for a Toolchain Integra...Planview
 
Introduction to 5w’s of DevOps
Introduction to 5w’s of DevOpsIntroduction to 5w’s of DevOps
Introduction to 5w’s of DevOpsCygnet Infotech
 
Accelerate Application Migration - August 5, 2020
Accelerate Application Migration - August 5, 2020Accelerate Application Migration - August 5, 2020
Accelerate Application Migration - August 5, 2020VMware Tanzu
 
[Customizable Template] How to Get Stakeholder Buy-In for a Toolchain Integra...
[Customizable Template] How to Get Stakeholder Buy-In for a Toolchain Integra...[Customizable Template] How to Get Stakeholder Buy-In for a Toolchain Integra...
[Customizable Template] How to Get Stakeholder Buy-In for a Toolchain Integra...Planview
 
Why DevOps is important for start-ups? | Calidad Infotech
Why DevOps is important for start-ups? | Calidad InfotechWhy DevOps is important for start-ups? | Calidad Infotech
Why DevOps is important for start-ups? | Calidad InfotechCalidad Infotech
 
Are your cloud applications performing? How Application Performance Managemen...
Are your cloud applications performing? How Application Performance Managemen...Are your cloud applications performing? How Application Performance Managemen...
Are your cloud applications performing? How Application Performance Managemen...DevOps.com
 
ds-suitesuccess-NetSuite
ds-suitesuccess-NetSuiteds-suitesuccess-NetSuite
ds-suitesuccess-NetSuiteColby Arkin
 

Similar to Presentation refactoring large legacy applications (20)

Next Generation IT Delivery - What it means to deliver atthe speed of the Dig...
Next Generation IT Delivery - What it means to deliver atthe speed of the Dig...Next Generation IT Delivery - What it means to deliver atthe speed of the Dig...
Next Generation IT Delivery - What it means to deliver atthe speed of the Dig...
 
What is DevOps? What is DevOps CoE?
What is DevOps? What is DevOps CoE? What is DevOps? What is DevOps CoE?
What is DevOps? What is DevOps CoE?
 
Sgin2013 scrum accomplished-industrialagilecasestudy-avinashrao
Sgin2013 scrum accomplished-industrialagilecasestudy-avinashraoSgin2013 scrum accomplished-industrialagilecasestudy-avinashrao
Sgin2013 scrum accomplished-industrialagilecasestudy-avinashrao
 
Extending and improving bps romania 30th of nov 2010
Extending and improving bps   romania 30th of nov 2010Extending and improving bps   romania 30th of nov 2010
Extending and improving bps romania 30th of nov 2010
 
How Oceanwide Accelerated its DevOps Adoption Journey with AppDynamics - AppS...
How Oceanwide Accelerated its DevOps Adoption Journey with AppDynamics - AppS...How Oceanwide Accelerated its DevOps Adoption Journey with AppDynamics - AppS...
How Oceanwide Accelerated its DevOps Adoption Journey with AppDynamics - AppS...
 
Modernize Siebel CRM with Open UI
Modernize Siebel CRM with Open UIModernize Siebel CRM with Open UI
Modernize Siebel CRM with Open UI
 
Live Webinar- Making Test Automation 10x Faster for Continuous Delivery- By R...
Live Webinar- Making Test Automation 10x Faster for Continuous Delivery- By R...Live Webinar- Making Test Automation 10x Faster for Continuous Delivery- By R...
Live Webinar- Making Test Automation 10x Faster for Continuous Delivery- By R...
 
Enterprise DevOps Transformation
Enterprise DevOps TransformationEnterprise DevOps Transformation
Enterprise DevOps Transformation
 
Application Modernization
Application ModernizationApplication Modernization
Application Modernization
 
DevOps in the Hybrid Cloud
DevOps in the Hybrid CloudDevOps in the Hybrid Cloud
DevOps in the Hybrid Cloud
 
Leonard Munyua, CIO at Simba Corporation - Legacy modernisation and adequate ...
Leonard Munyua, CIO at Simba Corporation - Legacy modernisation and adequate ...Leonard Munyua, CIO at Simba Corporation - Legacy modernisation and adequate ...
Leonard Munyua, CIO at Simba Corporation - Legacy modernisation and adequate ...
 
Performance Testing in the Agile Lifecycle
Performance Testing in the Agile LifecyclePerformance Testing in the Agile Lifecycle
Performance Testing in the Agile Lifecycle
 
Moving Applications to the cloud
Moving Applications to the cloudMoving Applications to the cloud
Moving Applications to the cloud
 
[Customizable Template] How to Get Stakeholder Buy-In for a Toolchain Integra...
[Customizable Template] How to Get Stakeholder Buy-In for a Toolchain Integra...[Customizable Template] How to Get Stakeholder Buy-In for a Toolchain Integra...
[Customizable Template] How to Get Stakeholder Buy-In for a Toolchain Integra...
 
Introduction to 5w’s of DevOps
Introduction to 5w’s of DevOpsIntroduction to 5w’s of DevOps
Introduction to 5w’s of DevOps
 
Accelerate Application Migration - August 5, 2020
Accelerate Application Migration - August 5, 2020Accelerate Application Migration - August 5, 2020
Accelerate Application Migration - August 5, 2020
 
[Customizable Template] How to Get Stakeholder Buy-In for a Toolchain Integra...
[Customizable Template] How to Get Stakeholder Buy-In for a Toolchain Integra...[Customizable Template] How to Get Stakeholder Buy-In for a Toolchain Integra...
[Customizable Template] How to Get Stakeholder Buy-In for a Toolchain Integra...
 
Why DevOps is important for start-ups? | Calidad Infotech
Why DevOps is important for start-ups? | Calidad InfotechWhy DevOps is important for start-ups? | Calidad Infotech
Why DevOps is important for start-ups? | Calidad Infotech
 
Are your cloud applications performing? How Application Performance Managemen...
Are your cloud applications performing? How Application Performance Managemen...Are your cloud applications performing? How Application Performance Managemen...
Are your cloud applications performing? How Application Performance Managemen...
 
ds-suitesuccess-NetSuite
ds-suitesuccess-NetSuiteds-suitesuccess-NetSuite
ds-suitesuccess-NetSuite
 

Recently uploaded

MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 

Recently uploaded (20)

Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 

Presentation refactoring large legacy applications

  • 1. © 2015 Nunsys Refactoring long-living legacy applications Manuel Alagarda Esteve
  • 2. © 2015 Nunsys A few things about me Jorge Capel Planells Consultor Business Software at NUNSYS Jorge.capel@nunsys.com @jcapelplanells
  • 3. © 2015 Nunsys The Life path of a long-living application Una evolución poco sostenible hoy, un sistema inviable mañana.
  • 4. Infeasibility Stage Sibylle Peter, Sven Ehrke, Canoo Engineering AG, www.canoo.com http://www.methodsandtools.com/archive/archive.php?id=98
  • 5. Do you have a legacy application problem? • Are you working in a critical application for your business or Company? • Does your company grow faster than your application? • Is your application able to achieve business goals in time? • Do you spend a lot of time and effort working in a new feature? • Could a simple change take weeks? • Do you invest a lot of time and effort fixing bugs? • Do you have a safety net of automated regression tests ? • Deliver a new version makes your heart sink?
  • 6. Yes, you have a problem
  • 8. Why do you have a legacy problem?
  • 9. © 2015 Nunsys Refactor or Rewrite?? Factores en los que nos basamos para tomar a esta decisión
  • 10. Refactoring “Refactoring is the process of changing a software system in such a way that it does not alter the external behavior of the code yet improves its internal structure.” Refactoring: Improving the Design of Existing Code Martin Fowler
  • 11. Key factors 1 Time to market 2 Continuous changes 3 Techical debt 4 Application size 5 Complexity 6 Cost of application redesign
  • 12. Refactor or Rewrite?? Technical debt Changes Time-to-market Size Complex Cost new application Refactor o Rewrite? REESCRIBIR High technical debt Low cost of new application REWRITE Technical debt 9 Changes 9 Time-to-market 10 Size 1 Complex 1 Cost of new application 3
  • 13. Refactor or Rewrite? Technical debt Changes Time-to-market Size Complexity Cost of new application Refactor o rewrite? REFACTOR Always refactor with low technical debt Technical debt 2 Changes 9 Time-to-market 10 Size 7 Complex 8 Cost of new application 8
  • 14. Refactor or Rewrite? Technical debt Changes Time-to-market Size Complex Cost of new application Refactor or Rewrite? Very high Technical debt Low changes Technical debt 8 Changes 2 Time-to-market 2 Size 5 Complex 5 Cost of new application 5
  • 15. Refactor or Rewrite? Technical debt Changes Time-to-market Size Complex Cost of new application Refactor or Rewrite? REFACTOR Technical debt 6 Changes 10 Time-to-market 10 Size 10 Complex 8 Cost of new application 10
  • 16. © 2015 Nunsys Case study Técnicas especificas de un proyecto de refactorización
  • 17. o Multinational car rental company located in 8 countries o With its own IT departament and development team o This team maintains and develops Company’s software assets o Software asset under study is a desktop application  8 years old  Aprox. 3,000,000 lines of code  Installed in 200 Workstation  300 users A case study
  • 18. o Deliver new functionality to production every 2 weeks o Plenty of showstopper bugs in production o At least two hotfixes for each release o We spend at least 20 percent of our time each iteration fixing production bugs o High time to market o High risk of failure. High cost of defects o No automated tests o No testing process State
  • 19. © 2015 Nunsys Prerequisites for succesful Refactoring Projects Condiciones y tareas previas requeridas para poder dar comienzo con un proyecto de refactorización
  • 20. Management support Management support is vital to success • Understand the value of investing in legacy systems is difficult. • We have to invest more time and money in an application that after all it works as required • It’s an opportunity to explain what improvements can help your business achieve.
  • 21. Numbers - ROI 0 5000 10000 15000 20000 25000 30000 0 50 100 150 200 250 300 350 400 450 Cost Features Total cost per features No refactor Refactoring Rewrite Cost Refactoring 5.000 Rewrite 15.000 Cost/Feauture Without Refactor 60 Refactoring 30 Rewrite 10
  • 22. Refactoring master plan ASSESSMENT PERIOD •Investigate the reasons for the deteriorated state of the application •Identify differentiators areas that constantly change •Identify differentiators areas that are critical for business achieve •Identify areas that changes are expensive
  • 23. Refactoring master plan GOALS •A clear separation between layers •Clean up the presentation layer •Replace GUI framework
  • 24. Refactoring master plan METRICS • Quality KPI’s(Technical debt, cyclomatic complexity,cohesion,…) • Tools: Sonar, Understand,… Define own KPI’s •Cost per feature •Cost per defect •DRE (Defect removal efficiency)
  • 26. Iterative and incremental development Project must have its own team refactoring “Refactor team” “Refactor team” must not develop new features PREPARATORY PHASE IMPLEMENTATION PHASE User cases Master Plan Design Parallel Tests tool Iteration 0 Analysis Refactor Refactor P.T Validaton Iteraction 1 Analysis Refactor Refactor PP Validation Iteration n Analysis Refactor Refactor PP Validación
  • 27. Version control and continuos integration RELEASE REFACTORING trunk RAMA FUNCIONALIDAD NUEVA Versión probadaTested version New feature branch
  • 28. Custom framework and working method •Standard development guide –SOLID –CLEAN CODE •Define application architecture •Use adequate technologies •Use frameworks
  • 29. Test automation • Automate more critical user cases with Functional GUI Testing automation • Parallel testing “Pruebas paralelas”
  • 30. © 2015 Nunsys Main problems Técnicas especificas de un proyecto de refactorización
  • 31. © 2015 Nunsys How can I extract the knowledge?
  • 35. © 2015 Nunsys Where should I Start?
  • 36. Mikado Method Technique used to identify and to plan refactoring tasks
  • 39.
  • 41. © 2015 Nunsys I can´t do it in only one iteration
  • 42. I can´t do it in only one iteration
  • 45. ?????
  • 47. © 2015 Nunsys I’ Cant test the legacy application
  • 48. © 2015 Nunsys Testing legacy applications Evitar errores mediante la automatización de pruebas
  • 49. Parallel Testing • It’s an “integration test” that runs twice with differents versions • Reference version (code before refactoring) • Refactor version (code after refactoring) • Test must be designed to execute a critical process against a high data volumen. Test must cover all critical paths • Two executions are independents and each one access to a identical DB. • Finally DBs are compared in order to look for differences
  • 52. Which version is our reference? RELEASE REFACTORING trunk RAMA FUNCIONALIDAD NUEVA Versión probadaTested version New feature branch
  • 53. Functional GUI Testing automation https://www.youtube.com/watch?v=JzAvIrk6uVI https://www.youtube.com/watch?v=ciDVHebNphc&list=PLEB B611A728FE430E Demostración
  • 54. More info about refactoring  Refactoring: Improving the Design of Existing Code – Martin Fowler  Working Efectivelly with Legacy Code - Michael Feathers  https://sourcemaking.com/refactoring