Few years back , I developed a concept of "Framework Migration" for any application.I conceptualized an idea of developing an eclipse based plug in which can practically migrate an application developed in struts to an equivalent spring application.
I started with listing similarities & dissimilarity between struts & spring framework. Gradually I was able to bridge between the two frameworks & finally came up with a Five Step approach for the same. To make things interesting I related these steps with medical terminologies. Following are the steps involved in Struts to Spring Migration.
Step 1-Face Lift: As JSP's & UI elements resemble as face of an application, Converting any struts specific tag in JSP's into its corresponding simple HTML tag.
Step 2-Organ Transplant:Struts provide FormBeans as interface between the JSP and the controller servlet. In Spring these are replaced by POJO (Plain Old Java Objects) Command Classes.
Step 3- Heart Transplant:Controller is the heart of the system. Struts provide ActionServlet by default as the controller. In Spring the default controller is DispatcherServlet. But in Spring we need to make different controllers which handle each module. These can be seen as replacement for Action Classes.
Step 4-Brain Transplant:Struts uses web.xml & struts-config.xml to direct the flow of the application. During migration to Spring, a new xml file will replace struts-config.xml.
Step 5- Blood Transfusion:Finally add framework specific jars in lib folder & provide respective path in classpath entry of the application.
We developed an Eclipse based plug-in (MIGRATOR) which is based on these steps.It automates the whole process & helps reducing the development efforts significantly. It creates a basic converted framework with ready to insert application specific logic. Migrator provides support for multiple IDE like Eclipse 3.0 or above, RAD 6,WSAD, Netbeans.With an user friendly installer , it can be installed easily.
Phase wise capability of the MIGRATOR plug-in at present
Face Lift 20%
Organ Transplant - 90%
Heart Transplant - 30%
Brain Transplant - 20%
Blood Transfusion - 90%
We also presented this research paper in IBM Rational Software Developer Conference 2006 where it received many appreciations & encouragement.
In case if you face similar situation please feel free to contact me through this blog. I'll try to help you out.
Thanks
Sourav K Sengupta