Monday, April 6, 2009

NET vs. Java and Java EE

The CLI and C# have many similarities to Sun's JVM and Java. They are strong competitors. Both are based on a virtual machine model that hides the details of the computer hardware on which their programs run. Both use their own intermediate byte-code, Microsoft calling theirs Common Intermediate Language (CIL; formerly MSIL) and Sun Java bytecode. On .NET the byte-code is always compiled before execution, either Just In Time (JIT) or in advance of execution using the ngen.exe utility.With Java the byte-code is either interpreted, compiled in advance, or compiled JIT. Both provide extensive class libraries that address many common programming requirements and address many security issues that are present in other approaches. The namespaces provided in the .NET Framework closely resemble the platform packages in the Java EE API Specification in style and invocation..NET in its complete form (Microsoft's implementation) is only available on Windows platforms and partially available on Linux and Macintosh, whereas Java is fully available on many platforms. From its beginning .NET has supported multiple programming languages and at its core remains platform agnostic and standardized so that other vendors can implement it on other platforms (although Microsoft's implementation only targets Windows, Windows CE, and Xbox platforms). The Java platform was initially built to support only the Java language on many operating system platforms under the slogan "Write once, run anywhere." Other programming languages have been implemented on the Java Virtual Machine but are not widely used.Sun's reference implementation of Java (including the class library, the compiler, the virtual machine, and the various tools associated with the Java Platform) is becoming open source under the GNU GPL license with Classpath exception. source code for the .NET framework base class library is available under the Microsoft Reference License, which is a closed-source license.The third-party Mono Project, sponsored by Novell, has been developing an open source implementation of the ECMA standards that define the .NET Framework, as well as most of the other non-ECMA standardized libraries in Microsoft's .NET. The Mono implementation is meant to run on Linux, Solaris, Mac OS X, BSD, HP-UX, and Windows platforms. Mono includes the CLR, the class libraries, and compilers for C# and VB.NET.The current version supports nearly all the APIs in version 1.1 of Microsoft's .NET and almost 96% of the APIs in version 2.0 of Microsoft's .NET. Support for the additional libraries in .NET 3.0 and 3.5 is in the early stages of development, as is support for C# 3.0 and LINQ.

No comments: