Title: Transforming Legacy Web Applications To The MVC Architecture
1Transforming Legacy Web Applications To The MVC
Architecture
- Yu Ping and Kostas Kontogiannis
- Electrical and Computer Engineering
- University of Waterloo
Terence C. Lau IBM Centre for Advanced
Studies IBM Toronto Laboratory
SDM-DS Workshop, STEP 2003 Amsterdam, The
Netherlands September 20, 2003
2TABLE OF CONTENT
- Introduction
- Design Rational
- Migration Framework
- JSP Refactorying Process
- Conclusion
Transforming Legacy Web Applications to the MVC
Architecture
3INTRODUCTION Problem Description
- Legacy Web Applications
- Designed by inflexible or less flexible
architectures and implemented by older
technologies - Maintainability 2-tier design
- Scalability Process-based
- Portability Server-dependent
- Some Examples
- CGI application (PERL, C, Python)
- Web Server APIs (ISAPI, NSAPI)
- Traditional JSP-based Web sites
Transforming Legacy Web Applications to the MVC
Architecture
4INTRODUCTION Migration to Network-centric
Platform
- Modern Web Applications
- Designed by component-based architectures and
supported by open standards and technologies - Maintainability 2-tier design ? Multi-tier
design - Scalability Process-based ? Thread-based
- Portability Server-dependent ?
Server-independent - Some Examples
- J2EE
Transforming Legacy Web Applications to the MVC
Architecture
5DESIGN RATIONAL MVC
- 1. Model-View-Controller (MVC) Design Pattern
- MVC separates the data persistence/business rule
(model), user interface (view), and application
control (controller) - The new system will adopt the MVC architecture in
an enterprise Java environment
Controller
(Servlet)
Model
Data
Client
(JavaBeans/EJB)
Base
View
(JSP)
Transforming Legacy Web Applications to the MVC
Architecture
6DESIGN RATIONAL Data Bean Architecture
2. Data Bean Compliant Architecture
- Query Command Bean
- Execute SQL statements through JDBC
- Data Bean
- Populate data in JSP pages
- Data Access Bean
- Carry data from query command beans to data beans
JSP Pages
Data Base
Activate
JDBC
Set input parameters
Query Command Bean
Data Bean
Invoke Query Command
Data Access Bean
Set output parameters
Get output parameters
Transforming Legacy Web Applications to the MVC
Architecture
7MIGRATION FRAMEWORK Transformation Methodology
Phase 1 Separating data base access (model) from
presentation logic (view) Phase 2 Making
transition to JSP Phase 3 Making the migrant
system extensible
Transforming Legacy Web Applications to the MVC
Architecture
8MIGRATION FRAMEWORK Transformation
Architecture
Source Code
JSP Application
Transforming Legacy Web Applications to the MVC
Architecture
9JSP Refactorying Process JSP Web Site
Reengineering
A Web site is a hyper-linked network environment,
usually without an engineering architecture.
We present an approach that aims to restructure
an existing JSP-based Web site by adopting a
controller-centric structure.
Transforming Legacy Web Applications to the MVC
Architecture
10CONCLUSION
- We present a reengineering framework for the
transformation of legacy Web applications to
enterprise Java environments based on the MVC
design pattern - Future extensions may focus on following
directions - Investigating the use of the wrapping technology
or Java connector architecture in order to
integrate the legacy Web applications - Examining the usage of a software clustering
technique with the purpose of identifying
cohesive groups of Web pages - Developing the technique for automatic
implementation of analyzing dynamic Web
components
Transforming Legacy Web Applications to the MVC
Architecture
11Transforming Legacy Web Applications To The MVC
Architecture
- Yu Ping and Kostas Kontogiannis
- Electrical and Computer Engineering
- University of Waterloo
Terence C. Lau IBM Centre for Advanced
Studies IBM Toronto Laboratory
EAI Workshop, STEP 2003 Amsterdam, The
Netherlands September 20, 2003