Free Newsletters
InfoWorld Daily

InfoWorld
Log-in | Register

Visual MainWin offers best of both .Net, Java worlds

Convert ASP.Net apps to J2EE apps? Mainsoft makes it happen

By Rick Grehan
June 11, 2004
 

When I first heard about Mainsoft’s Visual MainWin for J2EE, I thought the concept was a harebrained idea. Just skimming some of the product’s help topics sent me reeling: “Developing ASP .Net applications on J2EE.” Give me a break.

Free IT resource

TechNet: More ways to know it, share it, and keep it running.

Sponsored by Microsoft

Free IT resource

Attend the SOA Executive Forum: Breaking SOA Bottlenecks SOAExecForum.com/may2007

Sponsored by InfoWorld



Visual MainWin for J2EE, Version 1.0.1

Mainsoft, mainsoft.com

Excellent  9.1
criteria score weight
Interoperability 10 20%
Performance 9 20%
Scalability 9 20%
Ease-of-use 9 20%
Documentation 8 10%
Value 9 10%

Cost:
$5,000 per developer

Platforms:
Any platform supporting Visual Studio .Net 2003; deploys on any platform supporting Tomcat 5.0, WebSphere, or WebLogic app servers

Bottom Line:
Visual MainWin combines the best of two worlds: Java's run-anywhere capabilities with the smooth application development of the Visual Studio .Net IDE. If you want to move ASP .Net applications to places you never thought they could go, this is the tool for you.

About our Reviews and Scoring Methodology

Experimenting with the product put my sarcasm through a cleansing acid bath: If Visual MainWin for J2EE is a harebrained idea, it is the best-executed harebrained idea I’ve seen.

In a nutshell, Visual MainWin turns .Net applications into Java applications. But Visual MainWin for J2EE allows you to build ASP .Net apps — ones that use ADO (ActiveX Data Objects) .Net — and convert them to J2EE apps, deploy them to and debug them on J2EE app servers, and do it all from within Visual Studio .Net.

Visual MainWin for J2EE installs as a plug-in to the Visual Studio .Net IDE (integrated development environment). It also installs the included Tomcat 5.0 application server, which becomes the test bed for ASP .Net apps transformed into J2EE apps.

The word seamless has become nearly meaningless, but Visual MainWin’s integration into Visual Studio deserves the label. Visual MainWin attaches itself to the output of the compilation process and translates the IL (intermediate language) code coming out of Visual Studio into the equivalent Java bytecode. It packages the code into the proper archive file, depending on the target app server, and deploys the archive to the app server, along with Java versions of the ASP .Net and ADO .Net libraries.

Thus, MainWin turns Visual Studio .Net into a “develop, debug, and deploy” IDE for J2EE apps, with the peculiar twist that those apps can be written in VB (Visual Basic) .Net or C#.

Aside from the Visual MainWin project templates added to Visual Studio, you hardly know Visual MainWin is there. You can use all the server-side controls from ASP .Net. ADO .Net is implemented on top of JDBC, and the latest release of Visual MainWin provides a generic database connection.

What’s even more amazing is that the product wires the bytecode back to the .Net source for debugging purposes; you can single-step through C# or VB .Net source as Java bytecode executes. Not only is the translator converting IL code to bytecode, it’s preserving the debug information — an unexpected plus.

Visual MainWin does its best to map .Net entities to Java equivalents but must sometimes make exceptions — for example, in the case of exceptions. Java provides one exception class, but .Net provides three; Visual MainWin is forced to map all three .Net exceptions to the single Java exception. There’s no easy fix; you simply have to write around this many-to-one mapping.

Although all .Net exceptions are derived from the System.Exception class, not all Java exceptions are derived from java.lang.Exceptions; some generated by the JVM (Java Virtual Machine) are derived from the java.lang.Error class. This incongruence shows up in .Net code that tries to catch all exceptions. When translated into Java, exceptions derived from java.lang.Error slip by.

This is where Visual MainWin’s conditional compilation constants — JAVA and NET — come in handy. JAVA is true when the output of compilation is Java bytecode, and NET is true when the output is Microsoft IL. Use of these compilation constants allows you to create platform-agnostic source code. You can even import EJB references into a .Net project and call EJBs from VB .Net or C# code with Mainsoft-supplied wrapper code.

Visual MainWin for J2EE is remarkable; it is clever and smooth, and the exception-related write-arounds are but minor annoyances. At the very least, this opens the world of Linux to ASP .Net apps, and those results will be very interesting to watch.





 


 
Rick Grehan is a contributing editor at InfoWorld. Contact him at rick_grehan@infoworld.com.
 

TOP NEWS:


»  Four quick tips for choosing an IM security product
71 percent of businesses will invest in real-time messaging this year. If you're one of them, be sure to protect your enterprise

»  Forrester analysts ID hot IT jobs
Research group finds 16 IT roles with a promising future

»  Nvidia claims 10 hours of HD video on Tegra chip
The Tegra 600 and 650 can be used with hard disk drives and are designed partly for mobile Internet devices

»  Database vendors add Google's MapReduce
Greenplum and Aster Data Systems will support Google's programming technique, developed for parallel processing of large data sets across commodity hardware

»  Network management: Tips for managing costs
New technologies, changing requirements, and ongoing equipment maintenance and upgrades cost money, but there are ways to manage expenses

»  EMC targets SMBs, branch offices with new low-end storage
Celerra NX4 highlights include thin provisioning, snapshot technology for data recovery and backups, and Web-based console for management of storage volumes




Migrating to Vista
Join Windows Vista Expert, Richard Whitehead as he presents the benefits and challenges of migrating to Windows Vista. Sponsored by Novell

»  Click here to view this Webcast
  The Path to Enterprise Security
This is your comprehensive guide to Enterprise Security. In it you'll find solutions to the most pressing security threats facing you and your company. Learn the latest on insider threats and how to effectively minimize risk within your organization. Sponsored by Nokia

»  Click here to download now

- Special Advertising Partners -
WHITE PAPERS
 

» Technology White Papers Library

Technology White Papers by Topic

Technology White Papers E-mail Alert

Find out when the latest white paper is available:
 
 
INFOWORLD MARKETPLACE
 
» BUY A LINK NOW
 

FIND PRODUCTS AND COMPANIES
» COMPLETE PRODUCT GUIDE



TECHNOLOGY INDEX
• Applications
• Application Development
• Security
• Networking
• Wireless
• Platforms
• Hardware
• Data Management
• Storage
• Web Services
• Business
• Telecom
• Professional Services
• Standards

TECH WATCH 


What's the 411 on GOOG-411?
Just as Google has become synonymous with "performing a Web search," 411 is understood to mean "information" -- as in "what's the 411?" I was thus surprised to discover, from a billboard, no less, that the king of search is taking on the ...

Apple HTML source reveals 'iPhone Extreme'
"This one's a stretch..." reports AppleInsider. Um, yeah. Reporting on HTML code sightings of product names could be called a stretch, but iPhone Extreme has a ring to it. Now, that sounds like the product Apple should have released first, rather ...

COLUMNISTS

Unified under law
Ephraim Schwartz's Column and Blog (InfoWorld) - In the litigious world we live in, deploying a unified communications platform in your enterprise could...
» MORE COLUMNISTS

MORE INFOWORLD BLOGS


Open Sources 
Product Management
When I joined MySQL four years ago, there was quite a lot of debate about product management. We didn't actually have ...

Zero Day 
Botnet herders tending smaller flocks
New research backs up the theory that botnet operators are keeping their networks smaller in a continued effort to keep ...



• Advice Line
• Database Underground
• The Deep End
• Enterprise Mac
• Geeks in Paradise
• Grid Meter
• The Gripe Line
• InfoWorld Daily
• Inside IT
• IT Troubleshooter
• ITXtreme
• Open Sources
• ProdBlog
• Real World SOA
• Reality Check
• Security Adviser
• SMB IT
• The Storage Network
• Tech Watch
• Virtualization Report
• Zero Day

ADVERTISEMENT


RESOURCE CENTERadvertisement 

GOVERNMENT IT & POLICY
'If you don't go after the network, you're never going to stop these guys. Never.'
From the State Department, All the News for Inquiring Minds
TechPresident, the Internet Citizenry's New Consensus Taker



Sponsored Technology Links

 
 
 HOME  NEWS  BLOGS  PODCASTS  VIDEOS  TECHNOLOGIES  TEST CENTER  EVENTS  CAREERS   About | Advertise | Awards | RSS | Contact Us 

Copyright © 2008, Reprints, Permissions, Licensing, IDG Network, Privacy Policy, Terms of Service.
All Rights reserved. InfoWorld is a leading publisher of technology information and product reviews on topics including viruses,
phishing, worms, firewalls, security, servers, storage, networking, wireless, databases, and web services.

CIO :: ComputerWorld :: CSO :: Demo :: GamePro :: Games.net :: IDG Connect :: IDG World Expo
Industry Standard :: IT World :: JavaWorld :: LinuxWorld :: MacUser :: Macworld :: Network World :: PC World :: Playlist