SlideShare a Scribd company logo
1 of 16
Software Reengineering Don’t rewrite – reengineer!
Why Rework a Functioning System? Make it more maintainable Reorganize and update structure Move to a more modern language or platform Modularization Data reengineering Enable Process Reengineering Add new functionality Improve Performance Improved response to required system changes Introduce quality and other measurable improvements Future labor savings (dev team and business team) System Consolidation You can Rewrite or Reengineer Brad Irby - Alobria Systems
Advantages of Reengineering Reduced Customer Impact No Feature Freeze – Plane Stays in the Air Fits well with Agile Release Schedules Reduced Risk Maintains existing business logic, processes, and side effects Fewer errors interpreting existing system Reduced Cost Can use outside talent  Business logic already complete Shorter Timeline (about 6-9 months) Continuous QA 25% of the cost of a rewrite (Ulrich, 1990) Brad Irby - Alobria Systems
Before We See Code… Assumptions Winforms - Using Adapted Prism Unit Tests are rarely done now UI Requirements Winforms now ASP MVC near future WPF in the medium future Maybe Silverlight in far future Different UI’s But Single Controller Brad Irby - Alobria Systems
Preliminary Code Review Establish validity of MVC Everybody claims it, few have it Count Number of Static Classes Pure constant or enum classes don’t matter Count Activator Calls Count Average Num References per Project Look at validity of references Where is wizard controller logic? Know What You Are Up Against Brad Irby - Alobria Systems
Lay Groundwork (Basics) Decide Unit Test Framework External GUI runner Integrated into VS2008/2010 (TestDriven) Integrates with Code Coverage Integrates with TFS? Has Command Line Reporting with data export Nunit, MbUnit, MSTest Spend the time to do this right Brad Irby - Alobria Systems
Lay Groundwork (Basics) Divide Tests Integration tests Unit tests Install test runner TestDriven or Resharper are good Train Team TestDriven NUnit Training is an ongoing effort Brad Irby - Alobria Systems
Lay Groundwork (Basics) Setup Build Server Nightly build a must Email build Success/Fail Continuous Integration helps a lot Cruise Control and CCTray Nightly runs of integration tests Unit tests run on each checkin Peer Pressure Not To Break Builds Brad Irby - Alobria Systems
Lay Groundwork (Advanced) Decide on Code Coverage NCover or MS Team Coverage Stats should run nightly to develop trend Over time, decide on max Cyclomatic Complexity Decide on Mocking Framework Moq, Rhino mocks, Typemock Isolator (Big Daddy) Ensure data model is in project by itself Allows use from old and new code Get Team Buy-in on these Brad Irby - Alobria Systems
Let’s See Some Code! Project Structure Strategy Preliminary Code Cleanup Remove unneeded Using clauses and References VS PowerCommands for Usings References – brute force Update project target framework Clean up warnings “Warning as Errors” Careful of too many partial classes Code Changes Good for Junior Dev Brad Irby - Alobria Systems
Start Coding – Add Basics Dependency Injection Container Service Locator Message Aggregator Logger Module Manager Region Manager Toolbar Manager Repository (ORM?) Message Dialog Service Little Effect on Existing Code Brad Irby - Alobria Systems
Migrate Infrastructure Add Bootstrapper Establish first 2 modules Shared Smallest and Easiest Module Move Constants and Enums (Jr. Dev) Make these Static classes Look for Static Services classes Difficult to Mock and test (statics are sealed) Cause problems testing other things Search for “public static class” Change to normal class (singleton via container) Need Interface SearchPageFactory Small Changes Can Have Big Effects Brad Irby - Alobria Systems
Migrate Infrastructure Look for singleton patterns Search for “.Instance” Move to Service Locator BusinessObjectCacheManager Look for services with no Interfaces Can move to “everything” interface easily Put in ServiceLocator Watch your References Old to New = OK New to Old = Bad Slowly Move To New Infrastructure Brad Irby - Alobria Systems
Migrate Views & Controllers Start with Easiest Lots of infrastructure needed for first one Don’t complicate with difficult workflow Use views that don’t need data binding if possible Second – easy workflow with data binding Third – most complicated workflow Last – pass patterns on to team for implementation Build Example Patterns for Others Brad Irby - Alobria Systems
Testing Considerations Bootstrapper Add Extension methods to setup mocks Moq lets you get the Mock via an object Make plenty of Mocking examples for others to learn from Try for 75% or more coverage on new code Don’t overload TestSetup Common beginner mistake Unit Tests Difficult for Some Brad Irby - Alobria Systems
Parting Comments Don’t call old code “Legacy” Work closely with QA You will break things that were solid before Copy code to new projects where you can Unit Tests Difficult for Newbs Brad Irby - Alobria Systems

More Related Content

What's hot

Reverse Engineering
Reverse EngineeringReverse Engineering
Reverse Engineeringsiddu019
 
Software Re-Engineering in Software Engineering SE28
Software Re-Engineering in Software Engineering SE28Software Re-Engineering in Software Engineering SE28
Software Re-Engineering in Software Engineering SE28koolkampus
 
Bse 3105 lecture 4-software re-engineering
Bse 3105  lecture 4-software re-engineeringBse 3105  lecture 4-software re-engineering
Bse 3105 lecture 4-software re-engineeringAlonzee Tash
 
Software re engineering
Software re engineeringSoftware re engineering
Software re engineeringSelf-employed
 
Software re engineering
Software re engineeringSoftware re engineering
Software re engineeringdeshpandeamrut
 
Introduction to Software Reverse Engineering
Introduction to Software Reverse EngineeringIntroduction to Software Reverse Engineering
Introduction to Software Reverse EngineeringTeodoro Cipresso
 
Software Re-Engineering
Software Re-EngineeringSoftware Re-Engineering
Software Re-EngineeringSaqib Raza
 
Aspect Oriented Software Development
Aspect Oriented Software DevelopmentAspect Oriented Software Development
Aspect Oriented Software DevelopmentJignesh Patel
 
Software Reuse: Challenges and Business Success
Software Reuse: Challenges and Business SuccessSoftware Reuse: Challenges and Business Success
Software Reuse: Challenges and Business SuccessUniversity of Zurich
 
Software reuse ppt.
Software reuse ppt.Software reuse ppt.
Software reuse ppt.Sumit Biswas
 
962 sech04
962 sech04962 sech04
962 sech04aldwal
 
COCOMO Model For Effort Estimation
COCOMO Model For Effort EstimationCOCOMO Model For Effort Estimation
COCOMO Model For Effort Estimationgrandhiprasuna
 
Introduction to Aspect Oriented Software Development
Introduction to Aspect Oriented Software DevelopmentIntroduction to Aspect Oriented Software Development
Introduction to Aspect Oriented Software Developmentmukhtarhudaya
 
SE2_Lec 23_Introduction to Cloud Computing
SE2_Lec 23_Introduction to Cloud ComputingSE2_Lec 23_Introduction to Cloud Computing
SE2_Lec 23_Introduction to Cloud ComputingAmr E. Mohamed
 
A cost model for software reuse
A cost model for software reuseA cost model for software reuse
A cost model for software reuseasas402
 

What's hot (20)

Reverse Engineering
Reverse EngineeringReverse Engineering
Reverse Engineering
 
Software Re-Engineering in Software Engineering SE28
Software Re-Engineering in Software Engineering SE28Software Re-Engineering in Software Engineering SE28
Software Re-Engineering in Software Engineering SE28
 
Bse 3105 lecture 4-software re-engineering
Bse 3105  lecture 4-software re-engineeringBse 3105  lecture 4-software re-engineering
Bse 3105 lecture 4-software re-engineering
 
Ui design final
Ui design finalUi design final
Ui design final
 
Software re engineering
Software re engineeringSoftware re engineering
Software re engineering
 
Software re engineering
Software re engineeringSoftware re engineering
Software re engineering
 
Introduction to Software Reverse Engineering
Introduction to Software Reverse EngineeringIntroduction to Software Reverse Engineering
Introduction to Software Reverse Engineering
 
Software Re-Engineering
Software Re-EngineeringSoftware Re-Engineering
Software Re-Engineering
 
Aspect Oriented Software Development
Aspect Oriented Software DevelopmentAspect Oriented Software Development
Aspect Oriented Software Development
 
Software Reuse: Challenges and Business Success
Software Reuse: Challenges and Business SuccessSoftware Reuse: Challenges and Business Success
Software Reuse: Challenges and Business Success
 
Software resuse
Software  resuseSoftware  resuse
Software resuse
 
Software reuse ppt.
Software reuse ppt.Software reuse ppt.
Software reuse ppt.
 
Cots integration
Cots integrationCots integration
Cots integration
 
962 sech04
962 sech04962 sech04
962 sech04
 
COCOMO Model For Effort Estimation
COCOMO Model For Effort EstimationCOCOMO Model For Effort Estimation
COCOMO Model For Effort Estimation
 
Software Reuse
Software ReuseSoftware Reuse
Software Reuse
 
Ch18
Ch18Ch18
Ch18
 
Introduction to Aspect Oriented Software Development
Introduction to Aspect Oriented Software DevelopmentIntroduction to Aspect Oriented Software Development
Introduction to Aspect Oriented Software Development
 
SE2_Lec 23_Introduction to Cloud Computing
SE2_Lec 23_Introduction to Cloud ComputingSE2_Lec 23_Introduction to Cloud Computing
SE2_Lec 23_Introduction to Cloud Computing
 
A cost model for software reuse
A cost model for software reuseA cost model for software reuse
A cost model for software reuse
 

Similar to Software Reengineering

#DOAW16 - DevOps@work Roma 2016 - Testing your databases
#DOAW16 - DevOps@work Roma 2016 - Testing your databases#DOAW16 - DevOps@work Roma 2016 - Testing your databases
#DOAW16 - DevOps@work Roma 2016 - Testing your databasesAlessandro Alpi
 
Software reengineering for Developers
Software reengineering for DevelopersSoftware reengineering for Developers
Software reengineering for DevelopersBradley Irby
 
Large scale agile development practices
Large scale agile development practicesLarge scale agile development practices
Large scale agile development practicesSkills Matter
 
Whats New In 2010 (Msdn & Visual Studio)
Whats New In 2010 (Msdn & Visual Studio)Whats New In 2010 (Msdn & Visual Studio)
Whats New In 2010 (Msdn & Visual Studio)Steve Lange
 
Best practice adoption (and lack there of)
Best practice adoption (and lack there of)Best practice adoption (and lack there of)
Best practice adoption (and lack there of)John Pape
 
So Your Boss Wants You to Performance Test Blackboard
So Your Boss Wants You to Performance Test BlackboardSo Your Boss Wants You to Performance Test Blackboard
So Your Boss Wants You to Performance Test BlackboardSteve Feldman
 
Using Lean Thinking to Identify and Address Delivery Pipeline Bottlenecks
Using Lean Thinking to Identify and Address Delivery Pipeline BottlenecksUsing Lean Thinking to Identify and Address Delivery Pipeline Bottlenecks
Using Lean Thinking to Identify and Address Delivery Pipeline BottlenecksIBM UrbanCode Products
 
Application Lifecycle Management with TFS
Application Lifecycle Management with TFSApplication Lifecycle Management with TFS
Application Lifecycle Management with TFSMehdi Khalili
 
Test Automation Framework Online Training by QuontraSolutions
Test Automation Framework Online Training by QuontraSolutionsTest Automation Framework Online Training by QuontraSolutions
Test Automation Framework Online Training by QuontraSolutionsQuontra Solutions
 
Testing Mozilla Web Properties
Testing Mozilla Web PropertiesTesting Mozilla Web Properties
Testing Mozilla Web PropertiesStephen Donner
 
UX in ALM Series - UX Project Worflow using TFS 2008
UX in ALM Series - UX Project Worflow using TFS 2008UX in ALM Series - UX Project Worflow using TFS 2008
UX in ALM Series - UX Project Worflow using TFS 2008Christian Thilmany
 
Ci tips and_tricks_linards_liepins
Ci tips and_tricks_linards_liepinsCi tips and_tricks_linards_liepins
Ci tips and_tricks_linards_liepinsLinards Liep
 
Designing a Test Automation Framework By Quontra solutions
Designing a Test Automation Framework By Quontra solutionsDesigning a Test Automation Framework By Quontra solutions
Designing a Test Automation Framework By Quontra solutionsQUONTRASOLUTIONS
 
Dev ops developer (session 3)
Dev ops developer (session 3)Dev ops developer (session 3)
Dev ops developer (session 3)MSDEVMTL
 
Azure DevOps for Developers
Azure DevOps for DevelopersAzure DevOps for Developers
Azure DevOps for DevelopersSarah Dutkiewicz
 
Alm Specialist Toolkit Team System 2008 Deep Dive
Alm Specialist Toolkit   Team System 2008 Deep DiveAlm Specialist Toolkit   Team System 2008 Deep Dive
Alm Specialist Toolkit Team System 2008 Deep DiveChristian Thilmany
 
Building an automated database deployment pipeline
Building an automated database deployment pipelineBuilding an automated database deployment pipeline
Building an automated database deployment pipelineRed Gate Software
 

Similar to Software Reengineering (20)

#DOAW16 - DevOps@work Roma 2016 - Testing your databases
#DOAW16 - DevOps@work Roma 2016 - Testing your databases#DOAW16 - DevOps@work Roma 2016 - Testing your databases
#DOAW16 - DevOps@work Roma 2016 - Testing your databases
 
Software reengineering for Developers
Software reengineering for DevelopersSoftware reengineering for Developers
Software reengineering for Developers
 
North east user group tour
North east user group tourNorth east user group tour
North east user group tour
 
Large scale agile development practices
Large scale agile development practicesLarge scale agile development practices
Large scale agile development practices
 
Whats New In 2010 (Msdn & Visual Studio)
Whats New In 2010 (Msdn & Visual Studio)Whats New In 2010 (Msdn & Visual Studio)
Whats New In 2010 (Msdn & Visual Studio)
 
Best practice adoption (and lack there of)
Best practice adoption (and lack there of)Best practice adoption (and lack there of)
Best practice adoption (and lack there of)
 
So Your Boss Wants You to Performance Test Blackboard
So Your Boss Wants You to Performance Test BlackboardSo Your Boss Wants You to Performance Test Blackboard
So Your Boss Wants You to Performance Test Blackboard
 
Using Lean Thinking to Identify and Address Delivery Pipeline Bottlenecks
Using Lean Thinking to Identify and Address Delivery Pipeline BottlenecksUsing Lean Thinking to Identify and Address Delivery Pipeline Bottlenecks
Using Lean Thinking to Identify and Address Delivery Pipeline Bottlenecks
 
Application Lifecycle Management with TFS
Application Lifecycle Management with TFSApplication Lifecycle Management with TFS
Application Lifecycle Management with TFS
 
Test Automation Framework Online Training by QuontraSolutions
Test Automation Framework Online Training by QuontraSolutionsTest Automation Framework Online Training by QuontraSolutions
Test Automation Framework Online Training by QuontraSolutions
 
Testing Mozilla Web Properties
Testing Mozilla Web PropertiesTesting Mozilla Web Properties
Testing Mozilla Web Properties
 
UX in ALM Series - UX Project Worflow using TFS 2008
UX in ALM Series - UX Project Worflow using TFS 2008UX in ALM Series - UX Project Worflow using TFS 2008
UX in ALM Series - UX Project Worflow using TFS 2008
 
Ci tips and_tricks_linards_liepins
Ci tips and_tricks_linards_liepinsCi tips and_tricks_linards_liepins
Ci tips and_tricks_linards_liepins
 
Designing a Test Automation Framework By Quontra solutions
Designing a Test Automation Framework By Quontra solutionsDesigning a Test Automation Framework By Quontra solutions
Designing a Test Automation Framework By Quontra solutions
 
Dev ops developer (session 3)
Dev ops developer (session 3)Dev ops developer (session 3)
Dev ops developer (session 3)
 
Azure DevOps for Developers
Azure DevOps for DevelopersAzure DevOps for Developers
Azure DevOps for Developers
 
Alm Specialist Toolkit Team System 2008 Deep Dive
Alm Specialist Toolkit   Team System 2008 Deep DiveAlm Specialist Toolkit   Team System 2008 Deep Dive
Alm Specialist Toolkit Team System 2008 Deep Dive
 
Building an automated database deployment pipeline
Building an automated database deployment pipelineBuilding an automated database deployment pipeline
Building an automated database deployment pipeline
 
Day1
Day1Day1
Day1
 
Continuous deployment
Continuous deploymentContinuous deployment
Continuous deployment
 

Recently uploaded

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Recently uploaded (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

Software Reengineering

  • 1. Software Reengineering Don’t rewrite – reengineer!
  • 2. Why Rework a Functioning System? Make it more maintainable Reorganize and update structure Move to a more modern language or platform Modularization Data reengineering Enable Process Reengineering Add new functionality Improve Performance Improved response to required system changes Introduce quality and other measurable improvements Future labor savings (dev team and business team) System Consolidation You can Rewrite or Reengineer Brad Irby - Alobria Systems
  • 3. Advantages of Reengineering Reduced Customer Impact No Feature Freeze – Plane Stays in the Air Fits well with Agile Release Schedules Reduced Risk Maintains existing business logic, processes, and side effects Fewer errors interpreting existing system Reduced Cost Can use outside talent Business logic already complete Shorter Timeline (about 6-9 months) Continuous QA 25% of the cost of a rewrite (Ulrich, 1990) Brad Irby - Alobria Systems
  • 4. Before We See Code… Assumptions Winforms - Using Adapted Prism Unit Tests are rarely done now UI Requirements Winforms now ASP MVC near future WPF in the medium future Maybe Silverlight in far future Different UI’s But Single Controller Brad Irby - Alobria Systems
  • 5. Preliminary Code Review Establish validity of MVC Everybody claims it, few have it Count Number of Static Classes Pure constant or enum classes don’t matter Count Activator Calls Count Average Num References per Project Look at validity of references Where is wizard controller logic? Know What You Are Up Against Brad Irby - Alobria Systems
  • 6. Lay Groundwork (Basics) Decide Unit Test Framework External GUI runner Integrated into VS2008/2010 (TestDriven) Integrates with Code Coverage Integrates with TFS? Has Command Line Reporting with data export Nunit, MbUnit, MSTest Spend the time to do this right Brad Irby - Alobria Systems
  • 7. Lay Groundwork (Basics) Divide Tests Integration tests Unit tests Install test runner TestDriven or Resharper are good Train Team TestDriven NUnit Training is an ongoing effort Brad Irby - Alobria Systems
  • 8. Lay Groundwork (Basics) Setup Build Server Nightly build a must Email build Success/Fail Continuous Integration helps a lot Cruise Control and CCTray Nightly runs of integration tests Unit tests run on each checkin Peer Pressure Not To Break Builds Brad Irby - Alobria Systems
  • 9. Lay Groundwork (Advanced) Decide on Code Coverage NCover or MS Team Coverage Stats should run nightly to develop trend Over time, decide on max Cyclomatic Complexity Decide on Mocking Framework Moq, Rhino mocks, Typemock Isolator (Big Daddy) Ensure data model is in project by itself Allows use from old and new code Get Team Buy-in on these Brad Irby - Alobria Systems
  • 10. Let’s See Some Code! Project Structure Strategy Preliminary Code Cleanup Remove unneeded Using clauses and References VS PowerCommands for Usings References – brute force Update project target framework Clean up warnings “Warning as Errors” Careful of too many partial classes Code Changes Good for Junior Dev Brad Irby - Alobria Systems
  • 11. Start Coding – Add Basics Dependency Injection Container Service Locator Message Aggregator Logger Module Manager Region Manager Toolbar Manager Repository (ORM?) Message Dialog Service Little Effect on Existing Code Brad Irby - Alobria Systems
  • 12. Migrate Infrastructure Add Bootstrapper Establish first 2 modules Shared Smallest and Easiest Module Move Constants and Enums (Jr. Dev) Make these Static classes Look for Static Services classes Difficult to Mock and test (statics are sealed) Cause problems testing other things Search for “public static class” Change to normal class (singleton via container) Need Interface SearchPageFactory Small Changes Can Have Big Effects Brad Irby - Alobria Systems
  • 13. Migrate Infrastructure Look for singleton patterns Search for “.Instance” Move to Service Locator BusinessObjectCacheManager Look for services with no Interfaces Can move to “everything” interface easily Put in ServiceLocator Watch your References Old to New = OK New to Old = Bad Slowly Move To New Infrastructure Brad Irby - Alobria Systems
  • 14. Migrate Views & Controllers Start with Easiest Lots of infrastructure needed for first one Don’t complicate with difficult workflow Use views that don’t need data binding if possible Second – easy workflow with data binding Third – most complicated workflow Last – pass patterns on to team for implementation Build Example Patterns for Others Brad Irby - Alobria Systems
  • 15. Testing Considerations Bootstrapper Add Extension methods to setup mocks Moq lets you get the Mock via an object Make plenty of Mocking examples for others to learn from Try for 75% or more coverage on new code Don’t overload TestSetup Common beginner mistake Unit Tests Difficult for Some Brad Irby - Alobria Systems
  • 16. Parting Comments Don’t call old code “Legacy” Work closely with QA You will break things that were solid before Copy code to new projects where you can Unit Tests Difficult for Newbs Brad Irby - Alobria Systems

Editor's Notes

  1. In this presentation we are going to be going through a typical reengineering engagement with a fictional client. We will walk through all the steps necessary to reengineer an existing system from the start to the finish.
  2. There are many reasons to reengineer an existing system. These are only a few. We will talk to our client to find out what are the main reasons for the desire to reengineer their system.
  3. These are the main advantages of reengineering over rewriting.A largely ignored factor is that reengineering retains the unintended side effects of the way the current code was implemented. Customer come to depend on the small artifacts in our software, and if we rewrite it those artifacts will be lost without us knowing it. By keeping as much of the business logic as possible, these artifacts are retained, and customers are kept happy.
  4. We are assuming the project we will be working with is Winforms, and that the unit tests are few and far between.We also assume that our UI will be moving towards ASP MVC and also WPF. Silverlight is in the distant future.Note that we are going to be structuring the system so that all of the UI implementations will use the same business logic – without changes.
  5. First, we analyze the existing code to see what we are up against. This helps us estimate how long the project will take, what infrastructure elements we will need to introduce, and which elements will need to be replaced.
  6. Deciding on a proper unit test framework is an important first step. There are various options depending on various factors in the development environment.
  7. It is best to divide out the integration tests up front since they take so much time to run.Note that training is never done! All new additions must be accompanied by team training to make sure the team adopts the new technology. New infrastructure that nobody uses is worthless.
  8. Nightly builds are must. Builds on each checkin are helpful, but not required.
  9. Code coverage is a very useful tool, helping to measure progress towards complete test coverage.Mocking frameworks can be complicated, so the team should be involved in this decision.