Tools to Migrate Windows Applications
Microsoft Application Technologies Browser Based HTML Pages Created using Microsoft Front Page VB Scripts rendered by the browser Server Based Active Server Pages () ActiveX Data Objects (ADO) to access data COM (Component object model) and MTS database Client Based GUI Applications created using Microsoft Languages and tools Visual Basic and Visual C++ are the primary languages used by developers to create both server and client based applications 2
Application Migration Study 1 2 Static HTML Dynamic Data Application Patterns Used 9 Application Patterns typically used by Microsoft Developers 3 4 ADO ADO + Stored Procedures Today we will focus on patterns 3 and 9. 5 ADO/SP/DHTML 6 Stored Procedures (VB) COM 7 Stored Procedures (VC++) COM 8 Transactional SP/MTS (VC++) COM MS DTC 9 VB Client Use ADO to Update Database 3
Microsoft Application Technologies Browser HTML Pages Pages Web Applications COM/DCOM/MTS.NET Server Side Components Visual Basic Visual C++ COM/DCOM/MTS.NET Client Applications Server Side Components 4
Demo: On Demand Insurance Company Old Windows Applications Internet (HTML + ) Windows 2000 Server Web Browser Windows 2000 Server Visual Basic Client 5
Migrate Microsoft Applications to IBM WebSphere/J2EE Server Client-Side Applet Container (browser) Applet HTTP SSL Web Container Server-Side RMI- IIOP EJB Container JSP Page Servlet Enterprise JavaBean J2SE Database Application Client Container Application Client HTTP SSL JMS JAAS JTA Java Mail JAF J2SE JAXP JDBC Connectors JMS JAAS JTA Java Mail JAF JAXP J2SE JDBC Connectors JMS JAAS JAXP JDBC RMI-IIOP J2SE 6
Enterprise Capability Running on Linux Robert Frances Group (RFG) Conducted a study* on WebSphere vs..net and came up with the following conclusions WebSphere is significantly less expensive to operate than.net especially on Linux. WebSphere Deployment was 32% cheaper than.net WebSphere has proven track record of security when compared to.net WebSphere performs better WebSphere is the best choice for Enterprise development project Platform Scores WS.NET Strategic Position 9 4 Acquisition 8 7 Development 7 6 Deployment 8 6 Management 9 6 Long-term Effects 8 5 Totals 8 6 Results of the RFG Study* *WebSphere vs..net: Choosing an e-business platform in the enterprise Download the report from RFG at : http://www.rfgonline.com/reprints/ibm/rfgj2eevsnet.pdf 7
How Do You Migrate? Understand the application List the application components that need to be migrated Obtain tools that help migration Migration steps Convert the application to be based on J2EE Use conversion tools where available Use Rational Application Developer to import migrated code and fix if necessary Migrate the application to WebSphere/J2EE on Windows first Then re-deploy on Linux Migrate Databases to DB/2 on Linux DB2 Migration Toolkit (MTK) makes the migration task easy Consider Interoperability and Simulation if necessary for coexistence during migration 8
Migration Tips Migrate From HTML (with proprietary FrontPage tags) Visual Basic Script Jscript To HTML (based on Open Standards) JSP Java Script Java Script Using Tool Manual or HTML Editors J from NetCoole 2JSP Converter from DiamondEdge J from NetCoole 2JSP Converter from Diamond Edge Manual Visual Basic Java DB2 VB Converter from Diamond Edge DB2 MTK (Migration Toolkit) 9
Lets Now Migrate On Demand Insurance Company Understand the application - Done! List the application components that need to be migrated Web Applications Technologies HTML (includes ADO) VB Script JScript Visual Basic Stored Procedures Obtain tools that help migration Rational Application Developer (RAD) J from NetCoole 2JSP converter from Diamond Edge VB Converter from Diamond Edge DB2 MTK from IBM 10
Migrate Web Applications First Mozilla Netscape Open Office Linux Java Linux Internet Explorer Office Outlook File Server Print Server Domain Controller Active Directory DNS DHCP Exchange 2000 Web Application ( / / COM) Samba Based File/Print Server XAD, Kerberos, OpenLDAP DNS DHCP Domino Web Application (HTTP, WebSphere) Visual Basic Client 11
Demo: Let's Begin Migrating Web Applications to JSP Conversion J from NetCoole 2JSP Converter from DiamondEdge Converting Scripts Tools complete most of the work Fix errors using Rational Application Developer Replace references to SQL database driver with that for DB2 12
Migrate from to DB2/Linux Mozilla Netscape Open Office Linux Java Linux Internet Explorer Office Outlook File Server Print Server Domain Controller Active Directory DNS DHCP Exchange 2000 Web Application ( / / COM) Samba Based File/Print Server XAD, Kerberos, OpenLDAP DNS DHCP Domino Web Application (HTTP, WebSphere) Visual Basic Client DB2 13
Lets now Migrate from to DB2/Linux using DB2 Migration Toolkit (MTK) Get it from http://www.ibm.com/software/data/db2/migration/mtk/ 5 Phase Migration Specify source using DDL files extracted from source or import scripts from previous extractions Convert source DDL into DB2 DDL Select formatting options that affect the conversion output MTK generates 2 outputs Refine generates DDL according to messages in report file, and return conversion to apply the changes Repeat as necessary Generate data transfer scripts that will create DB2 files and stored procedures Deploy to DB2 Once the migration is complete check client application ODBC/JDBC calls to make sure table and column names are correct 14
Demo: DB2 Migration Toolkit 2000 Database to be migrated Run the DB2 Migration Tookit Use Wizards to Convert Tables Stored Procedures View Migration Report Run scripts generated by the Toolkit to Import to DB2 Run DB2 on Linux! 15
Here's What we did to Migrate the Web Application Migrate From HTML (with proprietary FrontPage tags) Visual Basic Script Jscript To HTML (based on Open Standards) JSP Java Script Java Script Using Tool Manual or HTML Editors J from NetCoole 2JSP Converter from DiamondEdge J from NetCoole 2JSP Converter from Diamond Edge Manual DB2 DB2 MTK (Migration Toolkit) 16
Demo: Migrated On Demand Insurance Company WebSite Internet WebSphere/J2EE Linux Server Web Browser DB2 Linux Server 17
Migrate Visual Basic Client Server Applications to Java Based Applications Mozilla Netscape Open Office Linux Java Linux File Server Print Server Domain Controller Active Directory DNS DHCP Samba Based File/Print Server XAD, Kerberos, OpenLDAP DNS DHCP Internet Explorer Office Outlook Exchange 2000 Web Application Domino Web Application ( / / COM) (HTTP, WebSphere) Visual Basic Client DB2 18
Use Diamond Edge Tools and Rational Application Developer to Convert Visual Basic Applications Diamond Edge VB Converter is a Visual Basic add-in that converts Visual Basic applications to Java code Quick and Easy to use Conversion time of less than a second for 1000 lines of code No problem with 80% of converted code Converted code can be imported to Rational Application Developer for further debugging and enhancement Issues Inserts calls into proprietary library Code needs to be reverse engineered for debugging purposes Code is not 100% reliable in certain cases Every component project has to be individually converted Does not deal well with transactions and database access Database table and column names have to be verified anyway after migrating the database. 19
Demo: Conversion of Visual Basic Application Visual Basic Files Java Files Windows Linux 20
On Demand Insurance Company based on WebSphere J2EE on Linux Internet WebSphere/J2EE Linux Server Web Browser DB2 Linux Server Java Client 21
Summary of Migration Work Application Scenarios Application Migration Tool Database Migration Tool Database Migration Time (mins) Application Migration Time (mins) 1 Static HTML Rational App Developer (HTTP import, fix broken links) 21 2 J from NetCoole, Rational App Developer 24 3 ADO J from NetCoole, Rational App Developer DB2 MTK 30 43 4 ADO + Stored Procedures J from NetCoole, Rational App Developer DB2 MTK 45 48 5 DHTML J from NetCoole, Rational App Developer DB2 MTK 45 58 6 COM Components (VB) COM 2JSP from Diamond Edge ( and COM), Rational App Developer DB2 MTK 45 48 7 COM Components (VC++) COM 2JSP from Diamond Edge ( only), Rational App Developer DB2 MTK 45 111 8 Transactional /MTS (VC++) COM MS DTC 2JSP from Diamond Edge ( only), Rational App Developer DB2 MTK 45 115 9 VB Client Use ADO to do Update Database VB Converter from Diamond Edge, Rational App Developer DB2 MTK 45 27 22
Benefit of Migration Tools Application Scenarios Migration time with Tools (min) Manual Migration Time (min) % Diff 1 Static HTML 21 21 0 2 24 28 15% 3 ADO 73 103 29% 4 ADO + Stored Procedures 93 128 27% 5 DHTML 103 138 26% 6 COM Components (VB) 93 140 34% 7 COM Components (VC++) 156 186 16% 8 Transactional/MTS (VC++) 160 170 6% 9 VB Client Use ADO to update Database 72 130 44% 23
Some Real World Statistics on Data Base Migration from to DB2 Customer Stored Procedures Triggers Client Application Modules Tables Indexes Estimated Hours A 689 46 --- 327 1301 2000 B 502 29 27 205 615 1100 C 1800 --- 287 500 1000 5700 D 770 16 88 942 2654 3300 E 85 --- 24 --- ---- 235 24
What if You Cannot Migrate Immediately? Sometimes immediate Migration may not be possible. This may be due to Lack of budget Time Constraints Unavailability of skilled people who understand the application Fortunately it is still possible to reap the benefits of Linux using Simulation and Bridging Techniques Adopt Linux using these techniques first. Save on Microsoft License fees Migrate later when resources are available. 25
Windows Environment Simulation Tools Simulation of Windows Environment Compile C++ code and run it on Linux C++ Application Simulation of MS Libraries Linux Visual MainWin for Unix and Linux Compile Visual C++ code with native Unix/Linux compiler Bind with Visual MainWin library that Simulates Windows environment Execute on Unix/Linux 26
Demo: Visual MainWin for Linux Visual MainWin Plugin Visual C++ Application Visual Studio Linux Based Build Server Native Linux Binary 27
Simulation of Microsoft Frameworks Simulation of Windows frameworks Java based implementation of Microsoft frameworks Run Microsoft code in Java environment Windows Application Simulated Microsoft Framwork WebSphere J2EE Environment Stryon i Java-based implementation of framework Runs s in J2EE environment X86 only Cannot deal with ActiveX, DOM/DCOM Stryon inet Java-based implementation of.net Framework 28
Bridging WebSphere Windows J2EE Application Bridge.NET COM Objects A bridge allows Java components to interact with.net/com components as if they are Java components and vice versa Maintain the existing applications under Microsoft frameworks Build future applications on J2EE platforms Web Services could be used as bridges also Create Web Service wrappers for existing applications Message Queues could also be used in the same way 29
Bridging (Integration) Tools IBM Development tool for Java-COM Bridge Make calls in both directions Available on alphaworks www.alphaworks.ibm.com IBM Interface Tool for Java One way calls, Java to Microsoft ActiveX control Available on alphaworks www.alphaworks.ibm.com Stryon ihub Collection of bridges that support: Java to/from.net Java to/from DLLs, COM/DCOM. ActiveX Plug-ins for IDEs Stryon R-JAX (Remote Java ActiveX Server) Allows Java programs to link to ActiveX, DLL, and COM running remotely or locally Intrinsyc J-Integra Supports 2-way communication between Java components and COM/DCOM Intrynsic Ja.NET Allows 2-way access between Java client and.net Remoting objects JNBridge JNBridgePro Allows.NET Remoting clients to access Java objects 30
How About Developing Some New Applications?