Ch9 Maintenance and Evolution
Ch9 Maintenance and Evolution
Ch9 Maintenance and Evolution
Importance of evolution
Legacy systems
Software maintenance
https://cs.gmu.edu/~offutt/classes/437/maintessays/maintEvolutionOverview.html#:~:text=A%20possible
%20distinction%20is%3A,a%20higher%20or%20better%20state.
Legacy systems
Fault repairs
Changing a system to fix bugs/vulnerabilities and correct
deficiencies in the way meets its requirements.
Environmental adaptation
Maintenance to adapt software to a different operating
environment
Changing a system so that it operates in a different environment
(computer, OS, etc.) from its initial implementation.
Functionality addition and modification
Modifying the system to satisfy new requirements.
Reduced risk
There is a high risk in new software development. There may be
development problems, staffing problems and specification
problems.
Reduced cost
The cost of re-engineering is often significantly less than the
costs of developing new software.
Duplicate code
The same or very similar code may be included at different
places in a program. This can be removed and
implemented as a single method or function that is called
as required.
Long methods
If a method is too long, it should be redesigned as a
number of shorter methods.
Switch (case) statements
These often involve duplication, where the switch depends
on the type of a value. In object-oriented languages, you
can often use polymorphism to achieve the same thing.
30/10/2014 Chapter 9 Software Evolution 26
‘Bad smells’ in program code
Data clumping
Data clumps occur when the same group of data items (fields in
classes, parameters in methods) re-occur in several places in a
program. These can often be replaced with an object that
encapsulates all of the data.
Speculative generality
This occurs when developers include generality in a program in
case it is required in the future. This can often simply be
removed.