|
|
YOUR FEEDBACK
Did you read today's front page stories & breaking news?
SOA World Conference
Virtualization Conference $50 Savings Expire June 24, 2008... – Register Today!
SYS-CON.TV SYS-CON.TV WEBCASTS |
TOP LINKS YOU MUST CLICK ON Migration
Best Practices in Migrating from .NET to Linux
Visual MainWin for J2EE - A Way Out of Vendor Lock-In
By: Laurence Moroney
Aug. 12, 2005 03:00 PM
Digg This!
Page 2 of 3
« previous page
next page »
So if your middleware is built as Web Services and these services expose a WSDL interface to the consumer, how the physical service itself is constructed is irrelevant. Therefore, if you construct your middleware tiers as Web Services in .NET then, when it comes to porting them, you can replace each one in turn with a Java implementation without actually breaking the system. If, for example, you have the data retrieval layer implemented as a .NET Web Service, you can begin porting right away. There are many tools that let you take the WSDL of this Web Service and construct a skeleton Java application out of it. You can then take this skeleton and fill in the blanks, replacing the ADO.NET-based code with new code that uses JDBC. As the set of dependent classes that you're using is relatively few (this tier is architected to be data retrieval only) it should be relatively simple to recode the Web Service to use Java instead of C#. When you're done, you simply replace the Web Service reference on the business logic layer with a reference to the new Java-based Web Service, and you should be able to switch over with a minimum of fuss.
Best Practice 3: Use Web Services Between the Presentation Layer and the Middleware The Visual MainWin J2EE option is extremely compelling here. Since it uses a port of the .NET class libraries, its job is a lot easier and it can cross-compile your existing code to run on the Java runtime. Mainsoft developers, as supporters of the Open Source community, are partners with the Mono project, and have implemented the ASP.NET and ADO.NET class libraries that Mono supports in Java so that your C# code can more easily convert to Java. You can find more details here (http://dev.mainsoft.com/Default.aspx?tabid=39). Note that this page is an ASPX, but the Web server running it is actually Linux. It's based on a port of DotNetNuke to J2EE. Another great business advantage of using this tool is that you can have a single source solution for both Microsoft and J2EE platforms. With the tool handling the conversion from .NET to J2EE for you, you can concentrate your development skills on the C# or VB.NET languages. When converting this layer to Web Services, you'll have to have a presentation layer that understands Web Services. In the case of .NET, it's very simple to have a .NET Web Application consume a Web Service, so you're okay to go there. If you were to port this to a JSP-based application, your porting experience would vary from relatively simple (if you use simple HTML form-based controls on your UI) to extremely difficult (if you're using sophisticated .NET GUI controls such as the Calendar or Grid control). The JSP should be able to consume a Web Service easily too. In the next section you'll see an example of this four-tier architecture, built completely in .NET, and how it can be migrated to a WebSphere J2EE Application Server using the Visual MainWin for J2EE toolkit.
Example Scenario The full source code for the .NET implementation and the implementation that has been migrated to Java is available with the download for this article. This demonstration shows data moving through all the tiers, being retrieved from the Web Services, and having business logic to handle the currency conversion as well as orchestrate the data retrieval layer to provide a portfolio. You can see the front-end of the application in action running on Windows in Figure 2.
Migrating the Scenario in Phases So, here for example are the steps in migrating the data retrieval layer (assuming Visual Studio.NET and Visual MainWin for J2EE are installed).
As you can see, when you have this tiered system you can migrate piece by piece. The business logic layer was consuming the Web Service when it ran on .NET, and now that it runs on J2EE in Linux, all you have to do is recreate the Web reference to point at the one that's running on J2EE and it will execute. You can then repeat the process - using Visual MainWin for J2EE to migrate it to a J2EE project, run it on WebSphere in Windows, generate a WAR file, deploy the WAR file to WebSphere on Linux, and finally update the Web reference in the presentation layer to point to this one. Finally, the presentation layer itself can be moved to Linux in the same way. Figure 3 shows the .NET application that you saw in Figure 2 (and implicitly all the tiers above it) running on SUSE Linux 8.1. Page 2 of 3 « previous page next page » LATEST LINUX STORIES
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
|
SYS-CON FEATURED WHITEPAPERS MOST READ THIS WEEK |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||