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

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
[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
 
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
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
🐬 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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
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
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
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
 

Recently uploaded (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
[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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
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
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 

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.