Lecture 3 Software ReEngineering 10102022 104311am
Lecture 3 Software ReEngineering 10102022 104311am
?
Greenfield Software Development
Refers to developing a system for a totally new environment and requires
development from a clean slate – no legacy code around.
A pure Greenfield project is quite rare these days, you frequently end up
interacting or updating some amount of existing code or enabling integrations.
3
Advantages - Greenfield Software
Development
4
Disadvantages - Greenfield Software
Development
•Since all aspects of the new system need to be defined, it can be quite time
consuming
•It may be hard to get everyone involved to make critical decisions in a decent
time frame
5
Brownfield Software Development
?
Brownfield Software Development
Therefore, any new software architecture must consider and coexist with systems
already in place
Examples include:
• adding a new module to an existing enterprise system,
• integrating a new feature to software that was developed earlier,
• or upgrading code to enhance the functionality of an app.
7
Advantages - Brownfield Software
Development
8
Disadvantages - Brownfield Software
Development
9
Why non-greenfield engineering?
10
Why do w e (often) start from a
mess?
11
Recognizing the need to reengineer
• Obsolete or no documentation.
• Absence of thorough unit tests.
• Original developers or users have left.
• Inside knowledge of the system has disappeared.
• Limited understanding of the entire system.
• Too long to turn things over to production.
• Too much time to make simple changes.
• Need for constant bug fixes.
• Maintenance dependencies.
• Long recompilation times.
• Duplicated code.
• Code smells. 12
Lehman’s Laws of Software Evolution
Continuing change
A program that is used in a real-world environment must change,
as 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.
13
Evolution of Mozilla source code
14
Lehman’s Laws in Practice
16
Implications of the results
17
What is your decision?
According to Lehman: “there will always be
changes”
hack it?
Definition:
19
Reengineering Life-Cycle
problem problem
detection resolution
20
Reengineering Life-Cycle
Abstract view of
system
Reverse Engineering Forward Engineering
Existing Software
Reengineered system
System
21
Goals of reengineering
Testability
Understandability
Modifiability
Extensibility
Maintainability
…
22
Goals 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”
Design extraction
To improve maintainability, portability, etc.
25
Reengineering is a rebuild activity
• Before you tear down and rebuild the entire house, be sure that
the structure is weak. If the house is structurally sound, it may be
possible to “remodel” without rebuilding at much lower cost and
in much less time.
• Before you start rebuilding be sure you understand how the
original was built. Understand the wiring, the plumbing, and the
structural internals. Even if you trash them all, the insight you’ll
gain will serve you well when you start construction.
26
Reengineering is a rebuild activity
27
Reengineering Process Model
28
Reengineering Activities
Inventory Analysis
Every software organization should have an inventory of all applications.
The status of applications (e.g., business criticality) can change as a function of time,
and as a result, priorities for reengineering will shift.
30
Document Restructuring
Creating documentation is far too time consuming.
31
Reverse Engineering
The term reverse engineering has its origins in the hardware world.
32
Reverse Engineering
Reverse engineering for software is quite similar.
33
Code Restructuring
The most common type of reengineering is code restructuring.
In such cases, the code within the suspected modules can be restructured.
Data objects and attributes are identified, and existing data structures are
reviewed for quality.
35
Forward Engineering
Traditional process of moving from high-level abstractions and logical,
implementation-independent designs to the physical implementation of a
system.
36
The End