Week 1
Week 1
Challenges faced?
Brownfield Software Development
Advantages:
•If it is a long-term project, the existing team has to repeat the process, utilizing
previous experience. The basis of a project is well understood, so those who
have worked on it from the very beginning can easily work on incremental
changes and improvements continuously.
•Existing code can be reused with a set of new features on top, saving much time
and effort. Less coding means a product can be launched faster.
Brownfield Software Development
Disadvantages:
•The ability to work on something new, to develop a new code, is limited. The
chances of innovation are low.
•The presence of legacy code in a project can slow down the overall development
process or even increase costs.
Software systems are reengineered by keeping one or more of the following four
general objectives in mind:
• Improving maintainability.
• Migrating to a new technology.
• Improving quality.
• Preparing for functional enhancement.
Software Reengineering vs.
Software Evolution
Software Maintenance:
Is the modification of a software product after delivery to correct faults,
to improve performance or other attributes, or to adapt the product to
a changed environment.
Software Evolution:
A continuous change from a lesser, simpler or worse state to a higher or
better state.
•database reengineering,
• program transformation,
•design refactoring,
(i) Reverse Engineering: which analyzes existing software and identifies the
different components and their interrelationships to build one representations
of the system at a higher degree of abstraction;
2. Quiz: 4 (10%)
•There is a large set of lightweight tools and techniques to help you with
reengineering.
•Despite these tools and techniques, people must do job and they
represent the most valuable resource.
Lecture-1: Introduction
Object-Oriented Reengineering
Patterns
Chapter #1
What is a Legacy System ?
“legacy”
A sum of money, or a specified article, given to another by
will; anything handed down by an ancestor or predecessor.
— Oxford English Dictionary
60.3% Perfective
(new functionality)
18.2% Adaptive
(new platforms or OS)
4.1% Other
Continuing change
A program that is used in a real-world environment must change, or become progressively
less useful in that environment.
Increasing complexity
As a program evolves, it becomes more complex, and extra resources are needed to
preserve and simplify its structure.
New Functionality
Hack it in ?
Code symptoms
• big build times
• duplicated code
• code smells
Common Problems
Architectural Problems
•insufficient documentation
= non-existent or out-of-date
•improper layering
= too few are too many layers
•lack of modularity
= strong coupling
•duplicated code
= copy, paste & edit code
•duplicated functionality
= similar functionality
by separate teams
Goals/Need of Reengineering
Unbundling
split a monolithic system into parts that can be separately marketed
Performance
“first do it, then do it right, then do it fast” — experience shows this is the right sequence!
Port to other Platform
the architecture must distinguish the platform dependent modules
Design extraction
to improve maintainability, portability, etc.
Exploitation of New Technology
i.e., new language features, standards, libraries, etc.
Reduce human dependencies
Documenting knowledge about the system and making it easier to maintain.
Goals of Reverse Engineering
Cope with complexity
need techniques to understand large, complex systems
Generate alternative views
automatically generate different ways to view systems
Recover lost information
extract what changes have been made and why
Detect side effects
help understand ramifications of changes
Produce higher abstractions
identify latent abstractions in software
Facilitate reuse
detect candidate reusable artifacts and components
]
The Reengineering Life-Cycle
(0) requirement
Requirements analysis
(2) problem
(3) problem
detection
resolution
Designs
• people centric
(1) model
• lightweight
capture
Code
• All of the above statements are true, but not really relevant.
Software Does Age
Software aging is gaining in significance
because:
• “If only the software had been designed using today’s languages and
techniques …”
• Excellent software developed in the 60’s would work perfectly well today, but
nobody would use it.
•That software has aged even though nobody has touched it.
• “Weight gain” is a result of the fact that the easiest way to add a feature is to add new
code.
• Changes become more difficult as the size of the software increases because:
– There is more code to change,
– it is more difficult to find the routines that must be changed.
• A “younger” product will run faster and use less memory because it was
designed to support the new features.
Decreasing Reliability
As the software is maintained, errors are introduced.
• For a commercial product, the author was once told that the
list of known unrepaired bugs exceeded 2,000.
Reducing the Cost of S/W Aging
We should be looking far beyond the first release to the time
when the product is old.
– changes in the UI
– change to a new windowing system
– changes to data representation
– porting to a new operating system ...
Design for Change (Cont’d)
• Since it is impossible to make everything equally easy to
change, it is important to:
– organize the software so that the items that are most likely
to change are “confined” to a small amount of code
Why is Design for Change
Ignored?
• Textbooks fail to discuss the process of estimating the probability of
change for various classes of changes.
• Programmers are impatient because they are too eager to get the first
version working.
• Designs that result from this principle are different from the “natural”
designs of the programmer’s intuition.
Why is Design for Change
Ignored? (Cont’d)
• Few good examples of the application of the principle. Designers tend
to mimic other designs they have seen.
– poorly organized
– inconsistent
– incomplete
– written by people who do not understand the system
Documentation
• Hence, documentation is ignored by maintainers.
– A major step in slowing the age of older software, and often renewing it, is to
upgrade the quality of the documentation.
• Retroactive Modularization:
– Change structure so that each module hides a design decision that is likely to
change.
Software Geriatrics (Cont’d)
• Amputation: