Wednesday, August 08, 2007

* Java to DotNet (.NET) Migration - Options, Approaches and Tools

As the integration between Windows OS, Servers & Tools is getting better and they are leveraging the powerful .NET platform, the number of projects for Java to .NET migration has increased considerably. The Productivity improvements introduced by MOSS & Composite applications and VSTS for both end users and development teams has triggered the motivation of moving to .NET further.

In this post I will cover two important aspects of Java to .NET migration projects :

  • How different Java/J2ee technology stack maps to .NET technology stack ?
  • Various migration options and paths available to migrate with least impact on production sites and efforts.

Java/J2SE/J2EE to .NET Technology Stack Mapping

WEB LAYER

Swing Windows Forms
AWT Windows Forms
JSPs ASPX pages
JSTL ASP.NET Server controls
Http Filters HttpModule
Servlets HttpHandlers
Web Container/Application Server ASP.NET / IIS
Applets Windows Form User Controls

APP LAYER

EJBs Enterprise Services, Remoting, WCF
RMI /IIOP Enterprise Services, Remoting, WCF
EJB Container Enterprise Services, IIS, WAS
Session EJB Enterprise Services, Remoting, WCF
Entity EJB - CMP No equivalent
Entity EJB - BMP Serviced components with DataSets

Database / Integration Layer

JDBC ADO.NET :
Connected : Data readers
Disconnected : DataSets
JMS MSMQ, System.Messaging, WCF
JCA Biztalk

Runtime, Language & Others Components

jdk .NET BCL
JRE CLR
Packaged as .jar Assembly( dll,exe, module)
JAXB XML Serialization, XSD Tool
JAXP System.XML
Development tools Visual Studio Team System - complete ALM
Documentation SandCastle

 

MIGRATION PATHS

Currently three options are available for migrating java aps to .net :

  • Tool : Java Language Conversion Assistant (JLCA) - This tool is from Microsoft and currently is in Version 3.0. It takes java source code files and converts them to CSharp files. It also creates projects and support classes wherever direct mapping between jdk and BCL is not available. While over the period it has improved a lot but still its not 100% and some manual modifications will be required after conversion.
  • Visual J#.NET :  Its an another managed language from Microsoft which has syntax very similar to Java and provide libraries with functionality similar to jdk 1.1.4. Recommended if you plan to continue using existing java development skills but not recommended for interoperability with other managed applications.
  • jbimp : This tool comes with J# installation and can be used to convert byte code in .class files directly to MSIl assemblies. Its a good option for simple class files and uses J# libraries internally.

All the above tools assist in moving java apps to .net but there are limitations with each of them. If you plan to automate this process, you may have to write some custom tools to fill the gaps.

If you plan for a staged migration, java to .net interoperability options can also be used like web services, remoting bridges, etc. so that whole of app need not be converted at one go.

No comments:

Post a Comment