ZDNet UK


Skip to Main Content

ZDNet.co.uk - Winner of Best Business Website 2007
  1. Home
  2. News
  3. Blogs
  4. Reviews
  5. Prices
  6. Resources
  7. Community
  8. My ZDNet

 

ZDNet UK RSS Feeds


IT Jobs

Office applications Toolkit

Migrating to .Net?

Godfrey Baker

Published: 11 Sep 2002 09:44 BST

  • Email
  • Trackback
  • Clip Link
  • Print friendly
  • Post Comment

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.

Next

Previous

1 2


  • Email
  • Trackback
  • Clip Link
  • Print friendly Print with Dell

Did you find this article useful?
110 out of 206 people found this useful


Full Talkback thread

0 comments


Company/Topic Alerts

Create a new alert from the list below:

















Related Jobs

Financial Services Company seeks Senior Developer with Java, C++

You gain massive exposure to how asset classes work, how they trade and you will also learn real Financial Knowledge of this lucrative industry. ...

Are you a senior c# developer?

My client are looking for someone for up to 10 months to help them complete a conversion of existing applications from old school vb6, classic asp to ...

2 x Senior C# / Asp.Net Developers Required

Qualifications: > 5 years Experience with C#, ASP.NET Framework, JavaScript, HTML, XML > An ability to work effectively using agile development ...

Featured Talkback

Why do so many (virtually all) software packages think that they are so important that they have to be started automatically every time the computer boots? What is the largest number of "speed access", "update check", "camera download" and whatever other background programs you have ever seen running? Of those, how many did you really need?

By: J.A. Watson

Read full story:
Annoying software: a rogues' gallery

Discussions

AdamW AdamW

Linux, Laptops and Dual Displays

Saturday 26 July 2008, 6:34 PM

2 comments
keithmv keithmv

Password Deadlock

Saturday 26 July 2008, 12:02 PM

2 comments

Vista Upgrade Blog

Microsoft's pre-modern message puts a...

Over at ZDNet.com, Ed Bott reports a first sighting of Microsoft's eagerly awaited $300 million ad campaign. Already the cause of much speculation, the consensus is that this will be... More

8 comments

A $40 CONSUMER-class router has create...

Believe it or not I don't work in IT, haven't for 7 years. Yes I work with Microsoft's Windows XP Embedded and as a result I have to know a lot about the OS, the kernal, Win API calls... More

Post a comment

Sick Puppy Redo

I generally follow a dispassionate investigative process when trying to discern what happened when a project goes bad. Although its a low priority item, it gets done simply because... More

Post a comment