Documente Academic
Documente Profesional
Documente Cultură
Sourav Sengupta
Presenters
Makarand Hiralikar
Devendra Rajput
L&T Infotech
L&T Infotech
AM13
Agenda
AM13
Consulting
Organizations
Technology
Leaders
Technology
Solutions
Strategy
Alliances
Delivery
Engine
Interaction
Market
Analysis
Leading
Analysts
Domain
Competency
Affiliations
Industry
Bodies
AM13
SDLC
SDLC Helpers
Helpers
Industry
Industry Solution
Solution Frameworks
Frameworks
AM13
AM13
Framework Overview -
"
Framework
Basic architecture for designing a complex application
Helps in reducing the complexities
Enhances the concept of reusability along with the basic principles of design pattern
AM13
Framework Overview -
#"
Struts Framework
Based on MVC architecture
Model Business Services
Transfer Objects Business Services populate and return Transfer Objects
View JSPs, ActionForms
JSP queries ActionForm for form data
Controller ActionServlet, Actions
ActionServlet delegates control to Action class instances
Spring Framework
DispatcherServlet - Springs Front Controller implementation
Encapsulates navigation logic & delegates to the service objects for business
logic
View- JSPs
ModelAndView - Created by the Controller
Stores the Model data & associates a View to the request
Can be a physical View implementation or a logical View name
ViewResolver - Maps logical View names to actual View implementations
HandlerMapping-Strategy interface used by DispatcherServlet for mapping incoming
requests to individual Controllers
AM13
$%& '(
.
"
"
"
"
"
"
/
!
,
+ ,
'
- ' . ,,
$/
. ' "' $
! *(
. ,,
$ '
0
.
*(
'
! *(
( '
#
$& '
#
'
)
'
( '
%
!
"
#
$
AM13
Comparison Contd
$ &) $
$%& '(
2
$
$
,
,,
'(
6 ' ,
'
3
(
3
(
(1
'
'
'
(
,,
1
,
# '
4/*
$
0
,
"5
'
$ (
2
/ '
(
',
(1
0
+
*
'
.
$
,
(
$
(
,,
,
(
AM13
AM13
(ex- login.jsp)
(ex- LoginForm.java)
TagLibs
Config Files
Library Files
(ex- struts.jar)
7
8
, ,
9:
*
7 ,
;
: ;
7
8, $ '
, ,
9:, $ ': ;
7 ,
7 ,
9:
:;
, 9:
+$%
9:
, 9:, $ ':
9:, $ ': ;
, 9:
7
;
+$
"
: ;
9: 7 ,,
:;
<
/
(
/
(
AM13
,(
=> ?
' "
,(
=> ?
'
AM13
' "
'
3
,
(
,( "
$ '
"
. ,,
,,
"
- ,
/)
)
- ,
/ ,
,
=
@
9 @
@
B3
C
,,
'
$ ':
,,
'
$ ':
: A
: A
'
8
'B 9 @
'
'A
'
D $
'
1
$
AM13
$
7
<
; 7
.*
<
7(
;7 (
<forward name="sucess"
path="/form/yyy.jsp" />
<property name="successView">
<value>yyy</value>
</property>
<forward name="failure"
path="/form/zzz.jsp" />
&
"
;action/0
<
<
3
<
Action
*.do
7
7
7
<
<
<,
7
,, ;
;action/0
;*.do/0
1
<
,, ;
1
2
8%
C
' ,
( C
AM13
AM13
AM13
WEB
Struts
project
Spring
Config
Checks
Checks
Ip/op framework
File types
Calls parsers
project
XML Parser
Writer
Creator
Action
Form
File Locator
File Converter
JAVA Parser
Highlights
Other Parser
(e.g. .property)
Architecture details
File Locator
Checks the input project folder is struts or spring
Checks the input project folder structure & files
Stores Input & Output project folder path in mapping database
File Converter
Checks file types
Calls appropriate File parsers
File Parsers
Individual parsers for individual file types
Converts struts related tags, codes etc to spring equivalent
File Creator
Creates Spring project folders structure
Copies converted files to appropriate folders
AM13
AM13
Operational Features
J2EE Framework Migrator
A Plug-in (MIGRATOR)
compatible with Eclipse
which
is
Features
This plug-in reduces certain overheads :
Creating new Folder Structure according to
the migrated framework.
Installing related Jars of migrated framework
Converting Configuration files from one framework to other.
Converting one Framework specific tags to other framework
specific tags
Converting Framework specific code
AM13
AM13
AM13
Phase in Migration
Plug in Capability
Face Lift
50%
Organ Transplant
90%
Heart Transplant
30%
Brain Transplant
20%
Blood Transfusion
90%
Overall the MIGRATOR Plug-in is capable to reduce 70% (approx) of the manual
efforts in migrating a simple Struts application to Spring. Further enhancements may
increase the level of automation.
AM13
AM13
Creator Classes
AM13
AM13
File Parsers
AM13
Mapping Database
AM13
Mapping Database
AM13
Demo
AM13
Migrator UI
AM13
AM13
AM13
Migration Summary
AM13
Further Enhancements
Presently MIGRATOR plug-in is capable of migrating simple applications in
Struts to Spring, for more complex applications
It can be enhanced to migrate areas such as
Struts tld library
Logic tags
Validation framework
Error handling
Database Mapping
Other Controllers of Spring
AM13
Known Issues
It only handles SimpleCommandController
findForward("sucess") , success is user defined tag which cannot be pre assumed for
success or failure views. So after conversion both the statements of Success & Failure
are inserted in comment , the programmer can choose the statement according to the
view required
Some closing tags are missed out or not in proper place , the programmer must ensure
it before executing
Programmer has to handle logical flow of the application as migrator handles only
framework specific code
AM13
Questions
AM13
Thank You
Makarand.Hiralikar@Lntinfotech.com
Sourav.Sengupta@Lntinfotech.com
Devendra.Rajput@Lntinfotech.com
AM13