Software Evolution PDF
Document Details
Uploaded by WellManneredIntegral4531
null
2021
Dr. Noha Adly
Tags
Summary
This document is a set of lecture notes on software evolution for a computer science course (CSE 322). It discusses topics such as software change, the importance of evolution, software evolution models (like the spiral model), and evolution processes.
Full Transcript
12/28/2021 Software change Software systems usually have long lifetime Softwar...
12/28/2021 Software change Software systems usually have long lifetime Software change is inevitable SOFTWARE EVOLUTION New requirements emerge when the software is used; The business environment changes; Errors must be repaired; New computers and equipment is added to the system; The performance or reliability of the system may have to be Evolution processes improved. Software maintenance Software systems have to adapt and evolve during their lifetime from initial deployment to final retirement. A key problem for all organizations is implementing and managing change to their existing software systems. Dr. Noha Adly CSE 322 - Software Evolution 1 Dr. Noha Adly CSE 322 - Software Evolution 2 1 2 Importance of evolution A spiral model of development and evolution Organizations have huge investments in their software systems - they are critical business assets. To maintain the value of these assets to the business, they must be changed and updated. The majority of the software budget in large companies is devoted to changing and evolving existing software rather than developing new software. Historical data suggests that between 60% and 90% of software costs are evolution costs About 75% of development staff in the USA in involved in software evolution Dr. Noha Adly CSE 322 - Software Evolution 3 Dr. Noha Adly CSE 322 - Software Evolution 4 3 4 12/28/2021 Software evolution models Software Evolution Life Cycle For Business Spiral model is applicable when same company is responsible through software lifetime Seamless transition from development to evolution Deployed in products and apps Evolution The stage where software is in operational use and is evolving as new Custom software follows a different model requirements are proposed and implemented in the system. Customer may take over support & evolution in house, Or Servicing Customer issue a separate contract to different company At this stage, the software remains useful but only essential changes made Diadv: discontinuities in evolution process are made i.e. bug fixes. No new functionality is added. Requirements and design documents may not be passed Company considers how the software can be replaced Companies may merge or reorganize, inherit software from other Phase-out: software may still be used but no further changes are made to it companies Retirement: Software is taken out of use Incurs further cost for system replacement and data migration Dr. Noha Adly CSE 322 - Software Evolution 5 Dr. Noha Adly CSE 322 - Software Evolution 6 5 6 Evolution processes There is no standard software change / evolution process Software evolution processes depend on The type of software being maintained; The development processes used; The skills and experience of the people involved. Evolution Processes Proposals for change are the driver for system evolution. an individual or group suggests changes and updates Non implemented requirements, new requirements, bug reports, ideas for software improvements Should be linked with components affected by the change, thus allowing the cost and impact of the change to be estimated. Change identification and evolution continues throughout the system lifetime – cyclical Dr. Noha Adly CSE 322 - Software Evolution 7 Dr. Noha Adly CSE 322 - Software Evolution 8 7 8 12/28/2021 Change identification and evolution processes The software evolution process model Dr. Noha Adly CSE 322 - Software Evolution 9 Dr. Noha Adly CSE 322 - Software Evolution 10 9 10 Change implementation Urgent change requests Iteration of the development process where the revisions Urgent changes may have to be implemented without to the system are designed, implemented and tested. going through all stages of the software engineering process A critical difference is that the first stage of change implementation may involve program understanding, If a serious system fault has to be repaired to allow normal operation to continue; especially if the original system developers are not If changes to the system’s environment (e.g. an OS upgrade) responsible for the change implementation. have unexpected effects; During the program understanding phase, you have to If there are business changes that require a very rapid understand how the program is structured, how it response (e.g. the release of a competing product, change in delivers functionality and how the proposed change legislation, etc..) might affect the program. The emergency repair process Specifications and design documents must be updated Dr. Noha Adly CSE 322 - Software Evolution 11 Dr. Noha Adly CSE 322 - Software Evolution 12 11 12 12/28/2021 Urgent change requests Agile methods and evolution Danger Agile methods are based on incremental development so the requirements, software design and the code become the transition from development to evolution is a inconsistent seamless one. system documentation and code are never realigned Evolution is simply a continuation of the development process Quick and workable solution are not usually the best w.r.t. based on frequent system releases. system structure Changes may be expressed as additional user stories. Accelerate the process of software ageing TDD and Automated regression testing are particularly After emergency code repairs are made, the new code valuable when changes are made to a system. should be refactored and improved to avoid program degradation. Dr. Noha Adly CSE 322 - Software Evolution 13 Dr. Noha Adly CSE 322 - Software Evolution 14 13 14 Handover problems Where the development team have used an agile approach but the evolution team is unfamiliar with agile methods and prefer a plan-based approach. The evolution team may expect detailed documentation to support evolution and this is not produced in agile processes. Software Maintenance Where a plan-based approach has been used for development but the evolution team prefer to use agile methods. The evolution team may have to start from scratch developing automated tests and the code in the system may not have been refactored and simplified as is expected in agile development. Dr. Noha Adly CSE 322 - Software Evolution 15 Dr. Noha Adly CSE 322 - Software Evolution 16 15 16 12/28/2021 Software maintenance Types of maintenance Modifying a program after it has been put into use. Fault repairs The term is mostly used for changing custom software. Changing a system to fix bugs/vulnerabilities and correct where separate development groups are involved before and deficiencies in the way meets its requirements. after delivery Code errors - simple / design errors – expensive / requirement Generic software products are said to evolve to create new errors – most expensive versions. Environmental adaptation Maintenance does not normally involve major changes to Maintenance to adapt software to a different operating the system’s architecture. environment The changes made may be simple changes to correct coding Changing a system so that it operates in a different environment errors, more extensive changes to correct design errors, or (computer, OS, etc.) from its initial implementation. significant enhancements to correct specification errors or to Functionality addition and modification accommodate new requirements. Modifying the system to satisfy new requirements. Changes are implemented by modifying existing components and adding new components to the system. Dr. Noha Adly CSE 322 - Software Evolution 17 Dr. Noha Adly CSE 322 - Software Evolution 18 17 18 Maintenance effort distribution Maintenance costs It is usually more expensive to add new features to a system during maintenance than it is to add the same features during development A new team has to understand the programs being maintained Separating maintenance and development means there is no incentive for the development team to write maintainable software Program maintenance work is unpopular Maintenance has a poor image among software engineers Staff are often inexperienced and have limited domain knowledge Old systems may be written in obsolete languages As programs age, their structure degrades and become harder to change Good software engineering techniques such as precise specification, test-first development, the use of object-oriented development, and configuration management all help reduce maintenance cost Dr. Noha Adly CSE 322 - Software Evolution 19 Dr. Noha Adly CSE 322 - Software Evolution 20 19 20 12/28/2021 Maintenance costs Software reengineering Usually greater than development costs (2* to 100* depending Software maintenance involves understanding the program to on the application). be changed and then implementing any required changes Affected by both technical and non-technical factors However, many systems, especially older legacy systems, are difficult to understand and change. Increases as software is maintained. Maintenance corrupts the software structure so makes further maintenance more difficult. You can reengineer these systems to improve their structure and understandability without changing its functionality. Ageing software can have high support costs (e.g. old languages, compilers etc.) Reengineering involves The only long term solution to this problem is to Re-documenting the system Refactoring the system architecture Think of systems as evolving through a continual development process - integrate development and maintenance Translating programs to a modern programming language Modifying and updating the structure of the system’s data. Maintenance should have as high a status as new software development. Try to avoid making major changes to the system architecture. Dr. Noha Adly CSE 322 - Software Evolution 21 Dr. Noha Adly CSE 322 - Software Evolution 22 21 22 Advantages of Reengineering Over Replacement General Model of the Reengineering Process Reduced risk There is a high risk in redeveloping business-critical software. Errors may be made in the system specification or development Delays in introducing the new software may mean business loss and extra costs Reduced cost The cost of re-engineering is often significantly less than the costs of developing new software. Dr. Noha Adly CSE 322 - Software Evolution 23 Dr. Noha Adly CSE 322 - Software Evolution 24 23 24 12/28/2021 Reengineering process activities Reengineering Cost Source code translation Using a translation tool - Convert code to a modern version of same (or new) language Reverse engineering Analyze the program to understand it; document its organization and functionality Program structure improvement Control structure is analyzed and modified for understandability; The costs of reengineering depend on the extent of the Program modularization work that is carried out. Reorganise the program: related parts are grouped, redundancy is removed, architectural refactoring There is a spectrum of possible approaches to reengineering e.g., a system that uses several different data stores may be refactored to Costs increase from left to right so that source code use a single repository translation is the cheapest option, and reengineering, as Data reengineering part of architectural migration, is the most expensive. Clean-up and restructure system data: redefine DB schemas, data migration, data cleansing Dr. Noha Adly e.g. duplicate records, etc.. CSE 322 - Software Evolution 25 Dr. Noha Adly CSE 322 - Software Evolution 26 25 26 Reengineering cost factors Refactoring The quality of the software to be reengineered. Refactoring is the process of making improvements to a The tool support available for reengineering. program to slow down degradation through change. The extent of the data conversion which is required. You can think of refactoring as ‘preventative maintenance’ that reduces the problems of future The availability of expert staff for reengineering. change. This can be a problem with old systems based on technology that is no longer widely used. Refactoring involves modifying a program to improve its structure, reduce its complexity or make it easier to understand. When you refactor a program, you should not add functionality but rather concentrate on program improvement. Dr. Noha Adly CSE 322 - Software Evolution 27 Dr. Noha Adly CSE 322 - Software Evolution 28 27 28 12/28/2021 Refactoring and reengineering ‘Bad smells’ in program code Re-engineering takes place after a system has been Duplicate code maintained for some time and maintenance costs are The same or very similar code may be included at different increasing. You use automated tools to process and re- places in a program. This can be removed and implemented as a engineer a legacy system to create a new system that is single method or function that is called as required. more maintainable. Long methods Refactoring is a continuous process of improvement If a method is too long, it should be redesigned as a number of throughout the development and evolution process. It is shorter methods. intended to avoid the structure and code degradation Switch (case) statements that increases the costs and difficulties of maintaining a These often involve duplication, where the switch depends on system. the type of a value. The switch statements may be scattered around a program. In object-oriented languages, you can often use polymorphism to achieve the same thing. Dr. Noha Adly CSE 322 - Software Evolution 29 Dr. Noha Adly CSE 322 - Software Evolution 30 29 30 ‘Bad smells’ in program code Key points Software development and evolution can be thought of as an Data clumping integrated, iterative process that can be represented using a spiral Data clumps occur when the same group of data items (fields in model classes, parameters in methods) re-occur in several places in a program. These can often be replaced with an object that For custom systems, the costs of software maintenance usually encapsulates all of the data. exceed the software development costs. The process of software evolution is driven by requests for changes Speculative generality and includes change impact analysis, release planning and change This occurs when developers include generality in a program in implementation. case it is required in the future. This can often simply be removed. There are 3 types of software maintenance, namely bug fixing, modifying software to work in a new environment, and implementing new or changed requirements. Software re-engineering is concerned with re-structuring and re- documenting software to make it easier to understand and change. Refactoring, making program changes that preserve functionality, is a form of preventative maintenance. Dr. Noha Adly CSE 322 - Software Evolution 31 Dr. Noha Adly CSE 322 - Software Evolution 32 31 32