Comparison of the Java and .NET platforms
From Seo Wiki - Search Engine Optimization and Programming Languages
|This article is written like a personal reflection or essay and may require cleanup. Please help improve it by rewriting it in an encyclopedic style. (January 2008)|
The two platforms, their programming libraries, their binary formats, and their runtime environments have largely been governed by very different means.
International standards organizations Ecma International and ISO/IEC define the standard for the .NET executable environment (known as the Common Language Infrastructure, or CLI), and .NET executable format (known as Common Intermediate Language, or CIL), but excluding most of the foundation classes (the Base Class Library, or BCL). This formal committee-based standardization process is in keeping with the way very popular languages like COBOL, Fortran and C have been standardized in the past. The standards do not include many new libraries that Microsoft has implemented on top of the standard framework, such as those for accessing databases, or building GUI and Web applications, such as Windows Forms, ASP.NET and ADO.NET.
To date, no part of Java has been standardized by Ecma International, ISO/IEC, ANSI, or any other third-party standards organization. While Sun Microsystems has unlimited and exclusive legal rights to modify and license its Java trademarks, Sun voluntarily participates in a process called the Java Community Process (JCP) that allows interested parties to propose changes to any of Sun's Java technologies (from language and tools to API) via forums, consultation exercises and expert groups. The JCP requires a membership fee for commercial contributors, while non-commercial contributors and individuals can join for free.
Within the rules of the JCP anyone can bring forward a proposal for a new Platform Edition Specifications or suggest changes to the Java language. All proposals are reviewed and voted on by interested JCP members at various stages throughout their lifecycle, however when it comes to including changes into the standard reference implementations (Java SE, Java EE and Java ME) modifications may be subject to rejection by Sun, who retain ultimate power of veto.
Java standards are maintained by a suite of test applications which examine every aspect of a given Java implementation against a rigorous specification. Only if an implementation passes the tens of thousands of individual tests can it use the trademarked name "Java", and associated logos and brands.
While "Java" is a Sun trademark, and only Sun can license the name "Java", numerous free software projects exist that are compatible with Sun Java. Most notably, GNU Classpath and GCJ provide a free software class library and a compiler that are partially compatible with the current version of Sun Java. Sun announced in November 13, 2006 that all Java source code, excluding closed-source code for which they do not retain rights, will be released under a modified version of the GPL, and released two fundamental parts of the JRE and JDK: HotSpot and the javac compiler under the GPL.
Following their promise, Sun released the complete source code of the Class library under GPL on May 8, 2007, except some limited parts that were licensed by Sun from 3rd parties who did not want their code to be released under an open-source license (see also Free Java implementations). Sun's goal is to replace the parts that remain closed with alternative implementations and make the class library completely open.
Microsoft's .NET CLI executable environment, and some of the corresponding class library, have been standardized and can be freely implemented without a license. A few standards-compliant free software environments have been implemented, such as the Mono Project and DotGNU. The Mono Project has also implemented many of Microsoft's non-standard libraries by examining Microsoft materials, similar to GNU Classpath and Java.
Microsoft is currently distributing a shared source version of its .NET runtime environment for academic use, however it is only supported on Windows XP SP2 and has not been updated after .NET 2.0.
The Mono project aims to avoid infringing on any patents or copyrights, and to the extent that they are successful, the project can be safely distributed and used under the GPL. On November 2, 2006, Microsoft and Novell announced a joint agreement whereby Microsoft promised not to sue Novell or its customers for patent infringement. According to a statement on the blog of Mono project leader Miguel de Icaza, this agreement only extends to Mono for Novell developers and users. Because of the possible threat of Microsoft patents, the FSF recommends that people avoid creating software that depends on Mono or C#. 
The Microsoft/Novell agreement was criticized by some in the open source community because it violates the principles of giving equal rights to all users of a particular program (see Agreement with Microsoft and Mono and Microsoft’s patents).
In response to the Microsoft/Novell agreement the Free Software Foundation revised its GNU General Public License to close the loophole used by Microsoft and Novell to bypass the GPL's very restrictive provisions on patent deals. The FSF also stated that by selling coupons for Novell's Linux software, the mechanism by which Microsoft circumvented the GNU license, it considers Microsoft to be a Linux vendor, and thereby subject to the full terms and conditions laid out in the GPL. (Microsoft issued the coupons because on the patent deal worked out between the two companies Novell's network patents were considered far more profitable to Microsoft than Microsoft's .NET patents were to Novell.)
In its proprietorship of Java, Sun works with an open culture, allowing multiple parties, from organizations to individuals, to steer the decision making process. Sun retains exclusive and unlimited legal rights to its Java intellectual properties, and the Java community is subject to those rights.
Sun's acceptance of third-party contributions goes to solve the problem of vendor lock-in at the cost of sometimes creating a baffling array of options for beginners wishing to choose a Java-based solution. Java has grown in popularity to become one of the most popular languages of the early 21st century, and the pluralist nature of its development has resulted in many different groups tackling the same (or similar) problems. This issue is particularly acute in the Enterprise space (web/Ajax/Web2.0 applications), where one must not only be familiar with Java, but also the various competing frameworks.
While Microsoft has developed C# and .NET without a formal community contribution system, the language and some parts of the executable format and runtime have been standardized and freely distributed through Ecma and ISO in an open and vendor-neutral process, rather than a process that retains veto and copy rights for Microsoft. However, the standards do not include many new libraries that Microsoft has implemented on top of the standard framework (see Standardization). Numerous C# and CLI community software projects, help and documentation sites, and discussion forums are under active development and maintenance, including those focusing on Windows development with Microsoft .NET or the Mono project, Free software Operating system development under the Mono project, and mobile development using Microsoft's .NET compact framework..
Microsoft is distributing a shared source release (version 1.0) of the .NET virtual machine that can be compiled and used on Windows, FreeBSD, Mac OS X, and other platforms. An updated version (2.0) is currently available, but the only officially supported platform is Windows. A community port to Linux of the 1.0 shared source .NET virtual machine is also available. In March 2003, O'Reilly Media published a book about Microsoft's shared source .NET runtime.
Traditional computer applications
Although Java's AWT (Abstract Windowing Toolkit) and Swing libraries are not shy of features, Java has struggled to establish a foothold in the desktop market. Sun Microsystems has also been slow, in the eyes of some, to promote Java to developers and end users alike in a way which makes it an appealing choice for desktop software. Even technologies such as Java Web Start, which have few parallels within rival languages and platforms, have barely been promoted.
The release of Java version 6.0 in December 11, 2006, saw a renewed focus on the desktop market with an extensive set of new tools for closer integration with the desktop. At the 2007 JavaOne conference Sun made further desktop related announcements, including a new language aimed at taking on Adobe Flash (JavaFX), a new lightweight way of downloading the JRE which sees the initial footprint reduced to under 2Mb, and a renewed focus on multimedia libraries.
An alternative to AWT and Swing is the Standard Widget Toolkit (SWT), which was originally developed by IBM and now maintained by the Eclipse Foundation. It attempts to achieve improved performance and visualization of Java desktop applications by relying on underlying native libraries where possible.
This is probably the arena in which the two platforms are closest to being considered rivals. Java, through its Java EE (aka Java Platform Enterprise Edition) platform, and .NET through ASP.NET, compete to create web-based dynamic content and applications.
Both platforms are well used and supported in this market, with a bevy of tools and supporting products available for Java EE and .NET. And both have high profile backers. For example, for Java: Oracle included direct support for Java into its database, while Google has used Java to power tools like Gmail.
Some of Sun's current Java-related license agreements for Java EE define aspects of the Java platform as a trade secret, and prohibit the end user from contributing to a third-party Java environment. Specifically, at least one current license for a Sun Java EE development package contains the following terms: "You may make a single archival copy of Software, but otherwise may not copy, modify, or distribute Software." — "Unless enforcement is prohibited by applicable law, you may not decompile, or reverse engineer Software." — "You may not publish or provide the results of any benchmark or comparison tests run on Software to any third party without the prior written consent of Sun." — "Software is confidential and copyrighted." However, while Sun's software is subject to the above license terms, Sun's Java EE API reference has been implemented under an open source license by the JBoss and JOnAS projects.
Microsoft's implementation of ASP.NET is not part of the standardized CLI, and while Microsoft's runtime environment and development tools are not subject to comparable secrecy agreements to Java EE, the official Microsoft tools are not open source or free software, and require Windows servers. However, a cross-platform free software ASP.NET 2.0 implementation is part of the Mono project (minus webparts and Web Services Enhancements).
Java's Java ME (formerly J2ME) has a very large base within the mobile phone and PDA markets, with only the cheapest devices now devoid of a KVM (a cut down Java Virtual Machine for use on devices with limited processing power). Java software, including many games, is commonplace.
While almost every mobile phone includes a JVM, these features are not always heavily used by users (particularly in North America). Initially Java applications on most phones typically consisted of menuing systems, small games, or systems to download ringtones etc. However, more powerful phones are increasingly being sold with simple applications pre-loaded, such as translation dictionaries, world clock displays (darkness/light, timezones, etc.) and calculators. Some of these are written in Java, although how often phone owners actually use them is probably unknown.
In January 2007 Steve Jobs suggested that Apple's iPhone would not support Java. Significantly, at that time Java's mobile platform was perceived as nearly ubiquitous across the cell phone market, commonly being used by software companies to write device-neutral mobile applications. Noted commentators argued against Jobs' stand, but when the iPhone finally appeared it did indeed lack both Java and Adobe's rival Flash technology, favoring instead simple web applications using the phone's Safari browser.
In October 2007 Apple bowed to pressure and announced that by early 2008 the iPhone would be opened up to allow development of software other than via the Safari browser. Neither Java nor Flash is supported under this plan, and Apple does not allow interpreters for any language to run on the phone.
Home entertainment technologies
Java has found a market in digital television, where it can be used to provide software which sits alongside programming, or extends the capabilities of a given Set Top Box. TiVo, for example, has a facility called "Home Media Engine", which allows JavaTV software to be transmitted to an appropriate TiVo device to complement programming or provide extra functionality (for example, personalized stock tickers on a business news program.)
A variant of Java has been accepted as the official software tool for use on the next generation optical disc technology Blu-ray, via the BD-J interactive platform. This will mean that interactive content, such as menus, games, downloadables, etc. on all Blu-ray optical discs will be created under a variant of the Java platform. Blu-ray equipment first went on sale to the consumer in 2006, and is currently not widely owned. However, the release of the Sony Playstation 3 in late 2006 and early 2007 may give the platform a boost.
The BD-J platform API is more extensive than its iHD rival, with an alleged 8,000 methods and interfaces, as opposed to iHD's 400. And while Microsoft is pushing iHD's XML presentation layer by including it with Windows Vista, iHD is still a newcomer in a market sector where Java technologies are already commonplace.
Runtime inclusion in operating systems
On Windows, Microsoft is promoting .NET as its flagship development platform, by including the .NET runtime in Windows XP Service Pack 2 and 3, Windows Server 2003, Windows Vista, Windows Server 2008 and Windows 7. Microsoft also distributes the Visual C# Express development environment at no cost.
.NET Framework 3.5 runtime is not pre-installed on versions of Windows prior to Vista SP1, and must be downloaded by the user, which has been criticized because of its large size (65 MB download for .NET 3.5).
While neither .NET nor Mono are installed with Mac OS X out-of-the-box, the Mono project can be downloaded and installed separately, for free, for any Mac user who wants to build and/or run C# and .NET software. As of 13 May 2008, Mono's System.Windows.Forms 2.0 is API complete (contains 100% of classes, methods etc. in Microsoft's System.Windows.Forms 2.0); also System.Windows.Forms 2.0 works natively on Mac OS X.
As a result of inclusion of .NET or Mono runtimes in the distributions of Windows and Linux, non-GUI applications that utilize the programming interfaces that are common to both .NET and Mono can be developed in C# or any other .NET language and then deployed across many operating systems and processor architectures using a runtime environment that is available as a part of the operating system's installation. Both Microsoft .NET and the Mono project have complete support for the Ecma- and ISO-standardized C# language and .NET runtime, and many of Microsoft's non-standardized .NET programming interfaces have been implemented or are under development in Mono, but each environment includes many components that have not been implemented in the other.
Starting with XP SP1a, Windows does not ship with a Java runtime environment. However according to a September 2003 press release some OEMs agreed to pre-install the JRE on their desktop and laptop models. Mentioned were Acer, Dell, Gateway, Hewlett-Packard, and Toshiba. These companies combined make up a simple majority of consumer PC's sold in the United States of America.
Java comes pre-installed on all new Apple computers since Mac OS X 10.0. Because Apple maintains the Java runtime for Mac OS X, updates are usually one or two versions behind the versions available from Sun for the other operating systems, and versions of Java are usually tied to the specific operating system version, so newer Java versions are usually unavailable for older versions of OS X.
Java comes pre-installed with many commercial Unix flavors, including those from Sun, IBM and Hewlett Packard. As of June 2009, the Fedora 9, Ubuntu 8.04, Debian, Slackware extra,, Mandriva and OpenSUSE distributions are available with OpenJDK, based completely on free and open source code. Since June 2008, OpenJDK passed all of the compatibility tests in the Java SE 6 JCK and can claim to be a fully compatible Java 6 implementation. OpenJDK can run complex applications such as Netbeans, Eclipse, GlassFish, or JBoss.
The Operating System Distributor License for Java (DLJ) is a Sun initiative to ease distribution issues with operating systems based on OpenSolaris or Linux.
If Java is not installed on a computer by default, it may be downloaded by the user as a web plugin. The web plugin process has been criticized because of the size of the Java plugin. Unlike other plugins the Java download is a full runtime environment, capable of running not just applets, but full applications and dynamic WebStart apps. Because of this the perceived download footprint is larger than some web plugins. However, compared to Java, other popular browser plugins have larger sizes: Java 6 JRE is 13 MB, but Acrobat Reader is 33 MB, QuickTime 19 MB, Windows Media Player 25 MB, the .NET Framework 3.0 runtime is 54 MB, and the .NET Framework 3.5 runtime is 197 MB (it's a united package for x86, x64 and IA-64, each part has approximately 60 MB).
At the JavaOne event in May 2007 Sun announced that the deployment issues with Java would be solved in two major updates during the lifespan of Java 6 (the changes will not be held over to Java 7.) These include:
- the introduction of a new consumer JRE edition, with an initial 2Mb footprint and the ability to download the remaining 9Mb in sections using an on-demand methodology.
- an improvement in support for automatically downloading updates to the JRE.
- support for pre-loading of the JRE, so applets and applications written in Java start up almost instantaneously.
- ↑ Results of comparison between jdk15 and classpath
- ↑ Free and Open Source Java - Project Overview
- ↑ Sun openjdk: Home
- ↑ Sun Java 2 Runtime License Agreement
- ↑ "Open JDK is here!". Sun Microsystems. 2007-05-08. http://mail.openjdk.java.net/pipermail/announce/2007-May.txt. Retrieved 2007-05-09.
- ↑ Java Finally Free and Open
- ↑ Rotor: Shared Source CLI Provides Source Code for a FreeBSD Implementation of .NET
- ↑ Microsoft and Novell Announce Broad Collaboration on Windows and Linux Interoperability and Support
- ↑ "Statement on the blog of Mono project leader Miguel de Icaza regarding patent protection for Mono". 2006-11-04. http://tirania.org/blog/archive/2006/Nov-04.html. Retrieved 2006-11-06.
- ↑ Stallman, Richard (2009-06-26). "Why free software shouldn't depend on Mono or C#". Free Software Foundation. http://www.fsf.org/news/dont-depend-on-mono. Retrieved 2009-07-02. "We should systematically arrange to depend on the free C# implementations as little as possible. In other words, we should discourage people from writing programs in C#. Therefore, we should not include C# implementations in the default installation of GNU/Linux distributions, and we should distribute and recommend non-C# applications rather than comparable C# applications whenever possible."
- ↑ "Microsoft's Empty Promise". Free Software Foundation. 2009-07-16. http://www.fsf.org/news/2009-07-mscp-mono. Retrieved 2009-078-03. "Until that happens, free software developers still should not write software that depends on Mono. C# implementations can still be attacked by Microsoft's patents: the Community Promise is designed to give the company several outs if it wants them. We don't want to see developers' hard work lost to the community if we lose the ability to use Mono, and until we eliminate software patents altogether, using another language is the best way to prevent that from happening."
- ↑ 12.0 12.1 Microsoft takes on the free world.
- ↑ Shared Source Common Language Infrastructure 1.0 Release
- ↑ Shared Source Common Language Infrastructure 2.0 Release
- ↑ Rotor Comes to Linux
- ↑ oreilly.com -- Online Catalog: Shared Source CLI Essentials
- ↑ Mono-Applications-Aplenty!, OSNews
- ↑ Google Web Toolkit
- ↑ 19.0 19.1 Java EE SDK 5 Update 2 No JDK download page (reference to license agreement)
- ↑ Mono: ASP.NET
- ↑ Jobs: No Java for you
- ↑ Steve Jobs on iPhone: No Java For You
- ↑ Steve Jobs alert: Killer Java app for iPhone
- ↑ HD-DVD vs. Blu-Ray, round 2
- ↑ Format Wars - Blu-ray vs HD DVD
- ↑ Zaharov-Reutt, Alex (2008-02-21). "Microsoft's HDi interactivity layer loses from HD DVD's death - but does it matter?". itwire.com. http://www.itwire.com/content/view/16780/1154/1/0/. Retrieved 2008-08-27. "While many claimed that creating interactivity with HDi was much simpler than using BD-J, the fact that HD DVD will see few future releases beyond 2008 means that, whatever the enthusiasts position on the relative merits of HDi vs BD-J, the BD-J interactivity format is now the winner"
- ↑ Microsoft article that refers to C# as its "flagship" language.
- ↑ microsoft.com: Visual C#
- ↑ "Dear Microsoft". 2008-01-09. http://channel9.msdn.com/ShowPost.aspx?PageIndex=1&PostID=370737#370737. Retrieved 2008-02-03.
- ↑ ".Net framework 3.5 size 166MB!". 2007-11-10. http://www.codeprof.com/dev-archive/179/12-1020-1798773.shtm. Retrieved 2008-02-03.
- ↑ Fedora embraces Mono - ZDNet UK
- ↑ Debian Mono Packages
- ↑ Wikipedia Uses Mono; Mono Integrated into Ubuntu/Debian - OSNews.com
- ↑ Fedora Catches Mono
- ↑ SUSE 10.1 released
- ↑ Wikipedia Uses Mono; Mono Integrated into Ubuntu/Debian
- ↑ "Mono – Plans". http://www.mono-project.com/Plans. Retrieved 2008-12-23.
- ↑ Sun signs up five more OEMs for Java
- ↑ "Digitimes.com". http://www.digitimes.com/systems/a20070420PR208.html. Available only for paid subscribers.
- ↑ Wade, Karsten (2008-03-13). "OpenJDK in Fedora 9!". redhatmagazine.com. http://developer.redhatmagazine.com/2008/03/12/openjdk-to-replace-icedtea-in-fedora-9/. Retrieved 2008-04-05. "Thomas Fitzsimmons updated the Fedora 9 release notes source pages to reflect that Fedora 9 would ship with OpenJDK 6 instead of the IcedTea implementation of OpenJDK 7. Fedora 9 (Sulphur) is due to release in May 2008."
- ↑ "openjdk-6 in Ubuntu". https://launchpad.net/ubuntu/+source/openjdk-6. Retrieved 2008-04-19.
- ↑ "Package: openjdk-6-jdk". debian.org. 2009-02-14. http://packages.debian.org/stable/openjdk-6-jdk. Retrieved 2009-02-16.
- ↑ Slackware Java package
- ↑ Mandriva Java package
- ↑ "Package: OpenJDK". opensuse.org. http://en.opensuse.org/OpenJDK. Retrieved 2009-06-01.
- ↑ Reinhold, Mark (2008-04-24). "There’s not a moment to lose!". http://blogs.sun.com/mr/entry/in_hardy_heron. Retrieved 2008-04-19.
- ↑ Sharples, Rich (2008-06-19). "Java is finally Free and Open". http://blog.softwhere.org/archives/196.
- ↑ Angel, Lillian (2008-03-13). "OpenJDK to replace IcedTea in Fedora 9". http://langel.wordpress.com/2008/03/13/openjdk-in-fedora-9/. Retrieved 2008-04-05.
- ↑ Operating System Distributor License for Java (DLJ)
- ECMA-335 Common Language Infrastructure (CLI), 4th edition (June 2006) Free download of Ecma CLI standard
- ISO/IEC 23271:2006 Common Language Infrastructure (CLI) Partitions I to VI The official ISO/IEC CLI standard