Microsoft and Sun debate .Net vs. Java

In an article in InfoWorld, the reporter covers a debate between Sun officials over the relative merits of each other's next generation programming tools.

Read more for some background...


Microsoft's .Net architecture is based on the use of a Common Runtime Library (referred to as the CRL), where the programming is done in any language and can be executed in any .NET compatible environment (read Windows machine). Since the CRL is common and all of the pieces (such as code distribution) are built into the run-time, you can move code from client to server quickly and relatively transparently.


Java, on the other hand, is a byte-code execution environment and a specialized language designed to run securely on a wide variety of platforms. Sun developed Java in the 1990's as an answer to platform-specific code and to encourage the use of languages that would allow it to continue developing systems using its nearly-proprietary Sparc processors. By developing the language and making it freely available, Sun grabbed the lion's share of the develop-once, execute-anywhere environment and has become popular for use in areas from web-based applets (code running inside of a web page) to server-based servlets (code that serves web pages on the server) and actual applications.

Basic comparison

Microsoft has had the opportunity to develop the .NET framework after seeing what has and has not worked in Java over the past few years, so it shows the advantages of coming after another environment, and of not having to provide backward compatibility for previous versions of the language and operating environment. Further, since it also uses an interpreted intermediate language, it still runs innto many of the machine abstraction performance penalties of languages such as Java.

It also has the disadvantages that come being a proprietary environment. Microsoft fully supports .NET on recent Windows platforms, however the Windows CE version is only available on x86 platforms, there is no support under any other operating system (including x86 UNIX systems, although a FreeBSD version of the CRL is available for test only).

Java has been widely accepted by the major players for server-side development (ironically, since its initial power was expected to be on the client side, due to the write-once, execute-everywhere design). Companies like Apple (WebObjects), Oracle (Application Server), IBM (WebSphere), BEA Systems, etc. have used Java successfully to deal with the problems of balancing security, portability, and run-time safety.

Java has also been adopted as a deployment language on mobile phones, using Sun's trimmed-down J2ME (Java 2 Mobile Edition). However, environments based on BREW (Qualcomm) seem to be gaining and keeping momentum for many of these applications in its native enviroment, despite the fact that J2ME applications can execute in the BREW environment using a small adaptor.


In the end, I'm not sure who is going to win out. It is clear that the requirement for communications standards (such as HTML, XML, SMTP, IMAP, etc) are going to continue to drive the future of network-based compatibility, and in this regard, neither of the two systems holds an advantage over the other.

The real threat to Java is from developers taking advantage of some of the "easy" pieces of .NET to obviate the need to protocol standards and just integrate front-end and back-end using .NET-style remote procedure calls with little or no regard for cross-platform compatibility.