Migrating to .Net?

ANALYSIS The .Net Framework has been touted as the next big thing for the distributed computing community. Redesigned from the bottom up, Microsoft's newest offering has made marked progress in areas such as XML integration, error handling, component processing, and reusable frameworks. The promise for Web development is clear: faster development, less custom coding, and increased stability. But what if your current application is currently a Java EJB implementation? Is it worth the cost and effort to migrate to Microsoft's new platform? While the benefits of .Net over Java EJB certainly will be debated for years to come, the difficulties involved with such a platform port are a little more predictable. Even assuming a compelling technical or business reason driving the requirement, here are five good reasons not to migrate your Java or J2EE applications to .Net. 1. CLR does not support Java The first stumbling block on the road to .Net is its set of supported languages. The .Net Framework relies on a Common Language Runtime (CLR) that promises compatibility with multiple languages, but this compatibility is limited currently to C#, C++, VB, and (soon to come) J#. Not surprisingly, Java is not a supported language in the CLR. It's possible to migrate the Java application tier to .Net without rewriting the application code in a CLR-supported language by using a Java COM bridge or Web services. Java COM, however, relies on third-party applications to create COM DLLs directly from pure Java code. Difficulties in debugging the resultant binary, as well as increased complexity in the environment, illuminates why such heterogeneous application development should be approached with caution, or avoided completely. An alternative strategy is to port your Java code to C# code. In theory, you can translate Java code directly into C# (and J#) code through automated applications. For example, ArtinSoft's Java Language Conversion Assistant Enterprise Edition (JLCA EE) promises up to 99 percent automatic conversion from Java to C#. However, such products have yet to prove themselves in the marketplace, and experience argues against believing in automatic code conversions. Whether through an automated processor or done manually, a language port will undoubtedly require associated architectural changes. Depending on the implementation specifics of your application, significant refactoring may be required when rewriting a Java application to VB, C++, C#, or J#. 2. IIS does not support JSP As if an application language port from Java to C# is not daunting enough, .Net will also require a presentation language port. JSP is not supported by IIS. Moving from JSP to ASP.Net is a significant undertaking and will demand a complete rewrite of the presentation layer. Additionally, major architectural models, such as code reuse through tag libraries, are not supported in ASP.Net. Tag libraries must be converted to server controls or server side includes (ssi). Interestingly, Java classes written to support tag libraries conceptually match .Net's code-behind classes. Significant work, however, will be required for the actual conversion. 3. Server controls require redesigns As mentioned, new architectural requirements will undoubtedly surface during a language rewrite of your code base for .Net. This will become immediately evident if the implementation of .Net server controls is planned. ASP.Net server controls are one of the biggest advantages offered by .Net. By utilising prebuilt server components, developers can reduce repetitive coding and easily access functionality through objects. Taking advantage of server controls during a migration to .Net will most likely entail removing custom presentation, application, and database code and replacing it with a server control and required database logic. When upgrading from an existing Microsoft application, this code extraction will not be difficult, especially if good coding practices have resulted in cleanly partitioned and well-organised code. However, when moving from a Java EJB application, server controls require deep vertical migration and may simultaneously impact the data, application, and presentation tiers of the application. Not only will the stored procedures, Java objects, and JSP files require porting to Microsoft-supported standards, they also will have to be modified to support the Server Control. For example, the DataGrid object provides complex table functionality to display a set of data records. Row and column selection, header styles, and paging functionality are just a few of the properties available for customisation. The DataGrid object is more functional and maintainable than any custom or proprietary code base is likely to be. But to take advantage of this control during a port from a Java application (assuming you're moving an Oracle data tier to SQL Server), it would require:
  • Rewriting P/L SQL to Transact SQL while formatting the queries to support the DataGrid.
  • Rewriting the Java application code into a .Net-supported language to invoke the SQL or stored procedures and to support the event model of the DataGrid.
  • Rewriting the JSP templates to ASP.Net while removing the code supporting the existing, custom data presentation objects.

Post your comment

In order to post a comment you need to be registered and logged in

Log in or create your ZDNet UK account below

Will not be displayed with your comment

By signing up for this service, you indicate that you agree to our Terms and Conditions and have read and understood our Privacy Policy. Questions about membership? Find the answers in the Membership FAQ

ZDNet UK Live

shkurte

12345

14 minutes ago by shkurte on RSA: Split passwords make secrets safer
shkurte

aaaa

15 minutes ago by shkurte on RSA: Split passwords make secrets safer
Andrew Donoghue

Hey - presume you mean something that builds on Apple's existing TV device? Apple have already had a couple of runs at building Apple TV and it's...

6 hours ago by Andrew Donoghue on Google's TV timing may reveal more to come
BVE2011

Google, Sony, Intel may build TV project www.zdnet.co.uk/news/emerging-tech/2010/03/18/google-sony-intel-may-build-tv-project-40088359/

ator1940

70,0000 to 90,0000 computers? A very small number considering some of these botnets are in the millions, and there are so many of them operating,...

7 hours ago by ator1940 on Microsoft says it decimated Waledac botnet
ator1940

I agree Roger, and why can't they write secure code? What will happen when they find stolen code in windows? They have a track record of...

7 hours ago by ator1940 on Microsoft lashing out at Linux, open source
ator1940

Do you think it will really take days?

7 hours ago by ator1940 on Microsoft previews Internet Explorer 9 with HTML 5 support
neilfab

@evilmanic have you seen the new hp on zdnetuk

Xwindowsjunkie

Wonder how many days it will take before somebody codes an exploitive hack for IE9?

19 hours ago by Xwindowsjunkie on Microsoft previews Internet Explorer 9 with HTML 5 support
roger andre

There are some really good people in Microsoft and I wonder, how embarassing it must be for them to see how the organisation behaves from it's...

1 day ago by roger andre on Microsoft lashing out at Linux, open source
ajclarke

Great new look for ZDNET UK web-site http://bit.ly/9R5eAA to check it out @ZDNetUK #zdnet

feedfrog

Microsoft previews Internet Explorer 9 with HTML 5 support - zdnet.co.uk http://bit.ly/9FSh23

kencogold

We were just pondering on when IE will get HTML5 and CSS3 onboard! this is excellent

1 day ago by kencogold on Microsoft previews Internet Explorer 9 with HTML 5 support
riptari

RT @suziedaniels: relaunched www.zdnet.co.uk raises the bar yet again! its so fast it makes my eyes bleed.

Bob Preece

This is brilliant - I borrowed one and straight away saw that a few AP`s were set up to the wrong country. It gives interference levels on each...

1 day ago by Bob Preece on Fluke Networks AirCheck Wi-Fi Tester
_SimonArnoldme

http://www.zdnet.co.uk/news/networking/2010/03/11/european-parliament-votes-down-acta-treaty-40085614/ (Where does this leave #Debill?)

suziedaniels

relaunched www.zdnet.co.uk raises the bar yet again! its so fast it makes my eyes bleed.

eparody

Redesign complet pour ZDNet UK et AU, Twitter au centre http://www.zdnet.co.uk/ http://www.zdnet.com.au/

cdutheil

RT @eparody: Redesign complet pour ZDNet UK et AU, Twitter au centre http://www.zdnet.co.uk/ http://www.zdnet.com.au/

ABridgwater

I just joined the ZDNetUK LinkedIn group http://bit.ly/aGgPhc

Featured white papers

Achieving PCI Compliance for:Privileged Password Management & Remote Vendor Access

For multi-store outlets, including retail, banking, grocery, gas, hospitality, convenience stores and others, reducing (or avoiding) the cost of in-store system support and maintenance while maintaining compliance with PCI and other requirements has become a strategic challenge.

Download now

Web 2.0 Security Threats: How to Protect Your Enterprise Network

Speaker: Dr. Chenxi Wang, Principal Analyst, Security and Risk Management, Forrester Research, Inc. As Enterprises are increasingly connected to the Internet and as hard organizational boundaries are fast disappearing, security professionals are facing fresh challenges in Enterprise computing.

Download now

MindManager - Tutorial for New Users - Short

This tutorial is for new MindManager users and teaches you how to get started, by creating maps, reading maps and organizing your information.

Download now