.NET takes a flying leap

.NET takes a flying leap

Summary: With Mainsoft's Grasshopper 2.0 you can port existing C# based ASP.NET Web applications to the Java universe. A new technology preview just came out, and the product should be finished by March. The Developer edition is free.

SHARE:
TOPICS: Software
8

In collaboration with the Mono project, Mainsoft has released a new technology preview of Grasshopper 2.0. This technology allows you to use Microsoft Visual Studio to develop ASP.NET Web applications using C#, convert them to pure Java applications, and deploy them on Linux and other Java-enabled platforms. You can even use Visual Studio's debugger to attach to and debug the application remotely.

.NET takes a flying leap

It works by compiling MSIL (the binary output from the C# or VB.NET compilers) into standard Java bytecode. The resulting pure Java deployment packages can be used in any Java EE application server such as Tomcat or JBoss. The Grasshopper plug-in automates the whole process and is fully integrated into Visual Studio.

Due to differences between .NET and Java, there are a few limitations on what .NET code can be supported. For example, you can't use unsafe code or call native Win32 APIs. See the online doc for more details.

Grasshopper is the free "Developer" edition of Visual MainWin for Java EE. Enterprise and Portal editions are also available - see this feature matrix for a comparison. Applications can be validated using the SUN Application Verification Kit (AVK) for the Enterprise, or if you use the non-free editions your applications can also be validated Ready for WebSphere Software. All editions use a mixture of open source (shared with the Mono project) and proprietary software.

The final release is expected to be available by March. For more info and downloads see the Mainsoft Developer Zone.

Topic: Software

Ed Burnette

About Ed Burnette

Ed Burnette is a software industry veteran with more than 25 years of experience as a programmer, author, and speaker. He has written numerous technical articles and books, most recently "Hello, Android: Introducing Google's Mobile Development Platform" from the Pragmatic Programmers.

Kick off your day with ZDNet's daily email newsletter. It's the freshest tech news and opinion, served hot. Get it.

Talkback

8 comments
Log in or register to join the discussion
  • Nice, but with limitations ...

    I have not studied the product, so take my opinion with a "grain of salt".
    I think that I doubt anyone would use this in any real complex project.
    And also why to change from Eclipse/NetBeans when they are Free, highly supported and integrated with deployment tools, and in particular Eclipse has Huge Support from a great number of ISV's, and that support is becoming bigger all the time?
    It might be very handy for someone making the transition from VS to Eclipse/NetBeans to change from code created in C# to Java.
    But it must contain a lot of limitations as the namespaces in C# are a grotesque copy of what Java has to offer.
    About the remote debugging ... well ... that must refer to debugging in the Microsoft environment ...


    Regards,
    Pedro
    p_msac@...
    • For Microsoft shops

      The product is aimed for those already using Visual Studio.NET for web application development. If they have customers who now are asking to host those apps in a Java EE server like JBoss or WebSphere, perhaps to get some benefit of those environments like clustering or low cost, this gives them a way to do that without completely re-engineering the application.

      Of course, if you had this requirement (running in a Java EE server) and were starting from scratch, you'd probably just write the app in Java (or another JVM-compatible language) and use a Java IDE.

      In Visual Studio, on Windows, you could always single step through an ASP.NET application (in particular the code-behind part) using the debugger. The Mainsoft plug-in allows you to do that even if your app has been converted to bytecode and is running on a Linux machine, still within the Visual Studio IDE.

      So, it's not for everybody, but very handy if you need it.
      Ed Burnette
    • But, if you are a .NET coder

      then it makes perfect sense. Given that Windows devlopers out number all other developers by a factor of hundreds to one this is a very handy addition to the tool chest.
      No_Ax_to_Grind
      • Windows != .NET

        Plenty of "Windows developers" use Java so this term shouldn't be conflated with ".NET developers". From everything I've read, the number of Java developers is the same or more than the number of .NET developers. Most developers still use Windows as their primary system, though anecdotal evidence shows the penetration of Linux and MacOSX is higher in the developer community than anywhere else.
        Ed Burnette
      • Could you clarify please?

        Not that numbers count that much but what exactly do you mean by "Windows Developers".
        Is it Developers working on software that runs on Windows?
        Or developers working on .Net or VB/ Visual Studio?
        Stats from IDC say the biggest and fastest growing developer language is Java, not .Net ..
        The number of Java developers is Bigger then the number of .Net developers and keeps on growing faster.
        Actually the .Net developers are developers that migrated from ASP and VB ... .Net is not gaining market share.
        The number of .Net developers is actually loosing "market share" against Java-based technologies.
        Ant this tool that Ed pointed out will help migrate from VS to the Java world.


        Regards,
        Pedro
        p_msac@...
  • Components?

    It'd be interesting to see how it takes .NET custom components and converts them, if at all. Probably a limitation. Even if it uses JSF (JavaServer Faces), there's a huge difference between a JSF component and a .NET component. Night and day really, but essentially accomplishing nearly the same thing. I'm curious.
    Voodoo187
  • I kind of expected .net to be faster

    .net 1.1 wasn't bad, but 2.0 is pretty slow.
    Just In time compiler for Java bytecode seems to be quite slow also, but this seems to be an implementation problem more than anything, as GCJ and other java to machine code compilers produce very fast code, and Java programs on cellphone seem to run very fast considering the light hardware.
    stevey_d
  • Cool, but Why?

    If you know C#, then you pretty much already know java. Why not just code the app in java or if you want to use C#, run the app on a windows server.
    rkennel