Transcript Class

Decomposing Java Legacy Systems into Components
Shimin Li and Ladan Tahvildari
Abstract
Java Legacy System Componentization
Evolving over a number of years, object-oriented legacy
systems embody substantial corporate knowledge,
including requirements, design decisions, and business
rules. In order to reuse these assets in a cost-effective
manner, it is important to develop a systematic strategy for
reengineering the object-oriented legacy system. This
research proposes a framework for extracting reusable
components from a Java legacy system and migrating them
to a component-based system by encapsulating reusable
features. Such features may be used as reusable
components in a cost-effective way. An integrated
experimental environment for performing the extraction and
migration processes has been designed and developed as
an Eclipse RCP application.
Integrated Componentization Environment
Java Legacy System Model
An Eclipse Rich Client Platform (RCP) application
Java Legacy system (S) = { C, I, RCI , F, FAI }
 Provide three perspectives:
 Parser
 Modeler
 Decomposer
 C – the set of all classes of the legacy system.
 I – the set of all interfaces of the legacy system.
 RCI – the static structure relationship set among classes and
interfaces. It is modeled as a Class and Interface Dependency Graph
(CIDG).
 F – the set of functional features provided by the system.
 Easily extensible to other perspectives such as:
 Evaluation
 Integration
 FAI – the set of abstract implementation of features. It is modeled as a
Feature Abstract Implementation Model (FAIM).
Meta-models
(XML Schema)
CIDG meta-model
FAIM meta-model
Class and Interface Dependency Graph (CIDG)
Introduction
Class
Problem Statement
Componentizing legacy system is essential for the
maintenance and the reuse. However, the major problem
against the widespread introduction of componentization is
the lack of cost-effectively identifying and extracting
reusable components from legacy systems.
Legacy
Systems
(.java files)
DI
DI
DI
DI
Raw Data
(XML Doc)
Class
DI
DI
DI
DI
System
Models
(XML Doc)
Class
Class
Class
Class
CIDG, FAIM
Component-Based
System
DI
DI
Research Focus
Modeler
DI
Class
DI
Class
…
Parser
Class
Decomposer
Design and develop a methodology for migrating from a
Java legacy system into a component-based system and
extracting all reusable components from the system by
 retrieving static structure of the legacy system
 extracting functional features that are scattered across multiple methods and
classes
 encapsulating the extracted features to change into reusable components
Minimize the componentization cost by
 retrieving automatically the system static structure
 identifying and encapsulating the feature as automatically as possible
 performing the reengineering process with a low level of source code
modification which may be done automatically
Research Goals
Class
Class or Interface
Decomposition
Algorithm
DI (Dependency Indicator) = (IH, RZ, AS, AG, CO, US)
If Inheritance relationship presents, IH = 1; otherwise IH = 0
If Realization relationship presents, RZ = 1; otherwise RZ = 0
If Association relationship presents, AS = 1; otherwise AS = 0
If Aggregation relationship presents, AG = 1; otherwise AG = 0
If Composition relationship presents, CO = 1; otherwise CO = 0
If Usage relationship presents, US = 1; otherwise US = 0
Figure 2 – Overview of Integrated Componentization Environment
Feature Abstract Implementation Model (FAIM)
N<feature name>
N<feature name>
N<feature name>
D<description>
D<description>
D<description>
H
H
Class
Design a modeling paradigm to identify static structures of a
legacy system.
Design a modeling paradigm to identify the features of a
legacy systems based on some user requirements.
Decomposition Rule
(XML Doc)
Reusable
Components
…
Class
Class
M1
H
…
Class
…
Class
…
M2
Class
Mn
FAIM = { M1, M2, … , Mn }
Develop a componentization algorithm to migrate from a
legacy system to a component-based system and extract all
reusable components using the above modeling paradigms.
Mi = { N, D, H }, 1 ≤ i ≤ n
N – name of the feature
D – description of the feature
H – host class/interface set of the feature
Design and develop an integrated componentization
environment to perform information retrieval, system
modeling, component extracting, and system migrating.
Figure 3 – A Screenshot of the Integrated Componentization Environment
Conclusion
Componentization Algorithm
Class
…
…
Class
Class
Class
Class
…
Class
Class
Input
 A Java legacy system
…
Class
Class
Class
…
Class
Class
…
Class
Java Legacy System
 The Class and Interface Dependency Graph (CIDG)
 The Feature Abstract Implementation Model (FAIM)
Output
 Target system (Component-based system)
Class
Class
Class
Class or Interface
Class
Reusable Component
…
Class
Class
 It is a set of classes, interfaces, and reusable components.
 Each component in the set does not have any dependency upon the
artifacts which are outside of the component. Hence the component can be
reused individually.
 A list of reusable components
Dependency
Target System
Figure 1 – Overview of Java Legacy System Componentization
 Each component provides a well-defined interface as the entry into the
component from outside.
 Each component can be packaged into a Java Archive (JAR) file.
Proposed a framework for extracting reusable components from
a Java legacy system and migrating from the legacy system to a
component-based system in a cost-effectively manner by
analyzing the static system structure and identifying and
encapsulating the functional features.
Developed an integrated componentization environment to
perform information retrieving, system modeling, component
extracting, and system migrating.
Contact / More Information
{ shimin, ltahvild }@swen.uwaterloo.ca