









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Reengineering Patterns, Reengineering, Reengineering Lifecycle, Reengineering Problems, Architectural, Design, Raman Ramsin, Lecture Slides, Patterns in Software Engineering, Department of Computer Engineering, Sharif University of Technology, Iran.
Typology: Slides
1 / 17
This page cannot be seen from the preview
Don't miss anything!










Patterns in Software Engineering โ Lecture 13 ReengineeringReengineering ย Goal of Reengineering
g^
g
^ Reducing the complexity of a
legacy system
sufficiently so that it can
continue to be used and adapted at an acceptable cost. ย^
Reasons for Reengineering^
Unbundling a monolithic system
so that the individual parts can be
^ Unbundling
a monolithic system
so that the individual parts can be
more easily marketed separately or combined in different ways. Improving performance. Porting the system to a new platform. Extracting the design
as a first step to a new implementation.
E^
l iti
t^
h^
l^
t^
t^
d^
tti^
i t^
t
^ E
xploiting new technology
as a step toward cutting maintenance costs.
^ Reducing human dependencies
by documenting knowledge about the
system and making it easier to maintain.
y^
g
Patterns in Software Engineering โ Lecture 13 Reengineering LifecycleReengineering
Lifecycle
Patterns in Software Engineering โ Lecture 13 Reengineering Problems: ArchitecturalReengineering
Problems: Architectural
ย
Insufficient documentation:
Documentation either does not
ย
Insufficient
documentation: Documentation either does not
exist or is inconsistent with reality. ย
Improper layering: Missing or improper layering hampers ย
Improper layering: Missing or improper layering hampersportability and adaptability. ย
Lack of modularity: Strong coupling between modules hampers ย
Lack of modularity: Strong coupling between modules hampersevolution.D^
li^
t d
d^
"C
t^
d^
dit" i
i k
d^
b t
ย
Duplicated code: "Copy, paste, and edit" is quick and easy, butleads to maintenance nightmares.D^
li^
t d f
ti^
lit^
Si^
il^
f^
ti^
lit^
i^
i^
l^
t d
ย
Duplicated functionality: Similar functionality is reimplementedby separate teams, leading to code bloat.
Patterns in Software Engineering โ Lecture 13 Reengineering PatternsReengineering
Patterns
ย
Reengineering patterns
codify and record knowledge about
modifying legacy software.modifying legacy software. ย^
They are stable units of expertise that can be consulted in anyreengineering effort:reengineering effort:^
they help in diagnosing problems and identifying weaknesses that mayhinder further development of the system
and
hinder further development of the system, and they aid in finding solutions that are more appropriate to the newrequirementsrequirements.
Patterns in Software Engineering โ Lecture 13 Reengineering Patterns: CategoriesReengineering
Patterns: Categories
Patterns in Software Engineering โ Lecture 13 Reengineering Patterns: Categories (2)Reengineering
Patterns: Categories (2)
6
Migration Strategies:
help keep a system running while it is being
6.^
Migration Strategies:
help keep a system running while it is being
reengineered and increase the chances that the new system will beaccepted by its users.
7.^
Detecting Duplicated Code:
help identify locations where code may
have been copied and pasted, or merged from different versions ofthe software.
8.^
Redistribute Responsibilities:
help discover and reengineer classes
with too many responsibilities.
9.^
Transform Conditionals to Polymorphism:
help redistribute
y^
p^
p
responsibilities when an object-oriented design has beencompromised over time.
Patterns in Software Engineering โ Lecture 13 Reengineering Patterns:
Setting Direction
Reengineering
Patterns:
Setting
Direction
Problem:
How do you establish a common sense of purpose in a team? Solution:
Establish the key priorities for the project and identify guidingfor the project and identify guidingprinciples that will help the team tostay on track.
Problem:
Which problems should you focus on first? Solution:
Start working on the aspects that are most valuable to yourcustomer.customer. Problem:
Which parts of a legacy system should you reengineer and
Problem:
How do you maintain architectural vision during the course of acomplex project? Solution:
Appoint a specific person whose responsibility in the role of Navigator is to
which should you leave as they are? Solution:
Only fix the parts that are "broken"- those that can no longer beadapted to planned changes.
responsibility in the role of Navigator is toensure that the architectural vision ismaintained.
Problem:
How do you keep your team synchronized? Solution:
Hold brief regular round Solution:
Hold brief, regular round table meetings.^ Problem:
How can you possibly tackle all the reported problems? Solution:
Address the source of a problem, th^ th
ti^ l^
t^ f
Problem:
How much flexibility should you try to build into the new system? Solution:
Prefer an adequate but simple solution to a potentially more
rather than particular requests of yourStakeholders.
simple solution to a potentially moregeneral but complex solution.
Patterns in Software Engineering โ Lecture 13 Reengineering Patterns:
Initial Understanding
Reengineering
Patterns:
Initial
Understanding
Problem
: How do you recover the way design concepts are represented in the source code? Solution:
Use your development expertise to conceive a hypothetical class diagram representingh^ d^
i^ R fi
h^
d l b^
if i^
h^ h
Problem
: Which object structures represent the valuable data?
the design. Refine that model by verifying whetherthe names in the class diagram occur in the sourcecode and by adapting the model accordingly.
Problem
: How can you quickly identify potential design problems in large software systems?
represent the valuable data? Solution:
Analyze the database schema and assess which structuresrepresent valuable data. Derive a classdiagram representing those entities.
Solution:
Measure the structural entities forming the software system (i.e., the inheritancehierarchy, the packages, the classes, and themethods) and look for exceptions in thequantitative data you collected.
Patterns in Software Engineering โ Lecture 13 Reengineering Patterns:
Detailed Model Capture
Reengineering
Patterns:
Detailed
Model Capture^ Problem
: How can you understand a cryptic piece of code? Solution:
Iteratively rename and refactor the code to introduce meaningful names and to make sure
Problem
: How do you keep track of, synchronize and share yourunderstanding about a piece of codeand the questions that you have? S^ l^ ti
Whil
ki^
g
the structure of the code reflects what the system isactually doing.
Problem
: How do you discover which Solution:
While you are working on the code, annotate it directly with thequestions you are facing.^ Problem
: How do you discover which objects are instantiated at run time andhow they collaborate? Solution:
Run each of the scenarios and use your debugger to step through thecode.
Problem
: How can you discover why the system is designed the way it is? Which parts of the system are stable and whichparts aren't? Solution:
Use tools to find entities where functionality has
Problem
: How do you determine which contracts
a class supports? Solution:
Look for common programming idioms that expose the way clients makeuse of the class interface. Generalize yourb^
ti^
i^ th^
f^
f^ t
t
been removed (sign of a consolidating design), and entitiesthat change often (sign of an unstable part of the design).
observations in the form of
contracts.
Patterns in Software Engineering โ Lecture 13 Reengineering Patterns: Migration StrategiesReengineering
Patterns: Migration Strategies
Patterns in Software Engineering โ Lecture 13 R fReference ย Demeyer, S., Ducasse, S., and Nierstrasz, O.,
Object-Oriented
Reengineering Patterns, Elsevier Science, 2003.