Comparison of the Java and .NET platforms

Last updated

Comparison of the Java and .NET platforms.

.NET

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. [1] 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. [2] Because of the possible threat of Microsoft patents, the FSF recommends that people avoid creating software that depends on Mono or C#. [3] [4]

Contents

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 strong and protective provisions on patent deals (considered by Microsoft as restrictive). [5] 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. [5]

The .NET market began to change in 2013, when Microsoft decided to open-source many of its core .NET Framework technologies under Apache License, [6] with even more donated to newly formed .NET Foundation in 2014. [7] Open-sourced technologies include ASP.NET MVC, Entity Framework, Managed Extensibility Framework, Roslyn compiler-as-a-service infrastructure (together with C# and Visual Basic .NET compilers), F# functional-first language compiler, [8] and many more. [9] Microsoft and Xamarin announced collaboration, with the intent to increase cross-platform availability of .NET on Mac OS, Linux, and mobile devices. [10]

Microsoft released in June 2016 .NET Core 1.0, which is an open-source cross-platform environment and a lean version of the pure Windows implementation. [11]

Traditional computer applications

Desktop applications

Although Java's AWT (Abstract Window Toolkit) and Swing libraries are not shy of features, Java has struggled to establish a foothold in the desktop market. Sun Microsystems was also slow, in the eyes of some,[ citation needed ] to promote Java to developers and end-users in a way that 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.[ citation needed ]

The release of Java version 6.0 on 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 that sees the initial footprint reduced to under 2  Mb, 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.

On Windows, Microsoft's .NET is a popular desktop development providing both Windows Forms (a lightweight wrapper around the Win32 API), Windows Presentation Foundation, and Silverlight. With the integration of .NET into the Windows platform, .NET apps are first class citizens in the Windows environment with tighter OS integration and native look and feel compared to Java's Swing.

Outside of Windows, Silverlight is portable to the Mac OS X desktop. Mono is also becoming more common in open-source and free software systems due to its inclusion [12] on many Linux desktop environments.

Server applications

This is probably the arena in which the two platforms are closest to being considered rivals. Java, through its Java EE (a.k.a. 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. Of the top 1,000 websites, approximately 24% use ASP.NET and also 24% use Java, whereas of all the websites approximately 17% use ASP.NET and 3% use Java. [13]

Some of Oracle's Java-related license agreements for Java EE define aspects of the Java platform as a trade secret, [14] and prohibit the end user from contributing to a third-party Java environment. Specifically, at least one current license for an Oracle 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 Oracle." — "Software is confidential and copyrighted." [14] However, while Oracle's software is subject to the above license terms, Oracle's Java EE API reference has been implemented under an open-source license by the WildFly (originally 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 implementation is part of the Mono project (minus Web Parts and Web Services Enhancements). [15] Mono supports ASP.NET 4.0 including Web Forms, Microsoft AJAX, and ASP.NET MVC. [16]

Embedded applications

Mobile applications

Google's popular Android platform for mobile application is based on Java. Google adopted a customised virtual machine called Dalvik to optimise the execution of Java code for mobile devices.

Oracle provides Java ME; a reference implementation for mobile OEM vendors. Java ME is made up of various profiles that are subsets of the Java desktop environment with additional libraries targeted at mobile and set-top-box development. Java ME 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 JVM for use on devices with limited processing power). Java software, including many games, is commonplace.

While many feature phones include a JVM, they are not always heavily used by users (particularly in South Africa). 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, time zones, etc.), and calculators. Some of these are written in Java, although how often phone owners actually use them is probably unknown.

Microsoft currently ships the .NET Compact Framework that runs on Windows CE and mobile devices, set-top boxes, and PDAs as well as the Xbox 360. Microsoft also provides the .NET Micro Framework for embedded developers with limited resources.

Alternatively, Novell licenses embeddable versions of Mono to third parties to use in their devices, and Xamarin commercially distributes the MonoDroid and MonoTouch framework for Android and iPhone development, respectively.

Windows Phone 7 uses Silverlight for native apps, but Windows Phone 8 has C# and XAML as the main languages.

Home entertainment technologies

Java has found a market in digital television, where it can be used to provide software that 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 Java TV 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.

Rather than using Java, HD DVD (the defunct high-definition successor to DVD) used a technology jointly developed by Microsoft and Disney called HDi that was based on XML, CSS, JavaScript, and other technologies that are comparable to those used by standard web browsers.

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. [17] 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. [18]

However, the fact that the HD DVD format has been abandoned in favor of Blu-ray means that HDi is no longer supported on any optical disc format, making the BD-J format a clear winner. [19]

Runtime inclusion in operating systems

.NET/Mono

On Windows, Microsoft has promoted .NET as its flagship development platform [20] 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 Studio Express development environment at no cost, [21] and the Visual Studio Community development environment at no cost, with limited use for organizations. [22]

.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). [23] [24]

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 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.

C# and the CLI are included and used in a number of Linux- and BSD-based operating systems by way of including the free software Mono Project. [25] [26] [27]

As a result of inclusion of .NET or Mono runtimes in the distributions of Windows and Linux, non-GUI applications that use 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. [28] [29] [27] 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, [30] but each environment includes many components that have not been implemented in the other.

Java

No current version of Windows ships with Java; they stopped shipping with Windows XP SP1a. Microsoft however currently supports and distributes Java.

Java was pre-installed on all new Apple computers beginning with Mac OS X 10.0 and ending with 10.6, after which Java 6 became an optional Apple download. [31] [32] Java 7 and later releases are provided by Oracle. [33]

Java comes pre-installed with many commercial Unix flavors, including those from Hewlett Packard, IBM, and Oracle. As of June 2009, the Debian, [34] Fedora 9, [35] Mandriva, [36] OpenSUSE, [37] Slackware extra, [38] and Ubuntu 8.04 [39] distributions are available with OpenJDK, based completely on free and open-source code. [40] 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. [41] [42] OpenJDK can run complex applications such as Eclipse, GlassFish, WildFly, or Netbeans.

The Operating System Distributor License for Java (DLJ) [43] was a Sun initiative to ease distribution issues with operating systems based on Linux or OpenSolaris.

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:

See also

Related Research Articles

<span class="mw-page-title-main">Java (programming language)</span> Object-oriented programming language

Java is a high-level, class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible. It is a general-purpose programming language intended to let programmers write once, run anywhere (WORA), meaning that compiled Java code can run on all platforms that support Java without the need to recompile. Java applications are typically compiled to bytecode that can run on any Java virtual machine (JVM) regardless of the underlying computer architecture. The syntax of Java is similar to C and C++, but has fewer low-level facilities than either of them. The Java runtime provides dynamic capabilities that are typically not available in traditional compiled languages.

In computing, cross-platform software is computer software that is designed to work in several computing platforms. Some cross-platform software requires a separate build for each platform, but some can be directly run on any platform without special preparation, being written in an interpreted language or compiled to portable bytecode for which the interpreters or run-time packages are common or standard components of all supported platforms.

Free Java implementations are software projects that implement Oracle's Java technologies and are distributed under free software licences, making them free software. Sun released most of its Java source code as free software in May 2007, so it can now almost be considered a free Java implementation. Java implementations include compilers, runtimes, class libraries, etc. Advocates of free and open source software refer to free or open source Java virtual machine software as free runtimes or free Java runtimes.

In computing, Java Web Start is a deprecated framework developed by Sun Microsystems that allows users to start application software for the Java Platform directly from the Internet using a web browser. The technology enables seamless version updating for globally distributed applications and greater control of memory allocation to the Java virtual machine.

In computing, a solution stack or software stack is a set of software subsystems or components needed to create a complete platform such that no additional software is needed to support applications. Applications are said to "run on" or "run on top of" the resulting platform.

<span class="mw-page-title-main">Java (software platform)</span> Set of computer software and specifications

Java is a set of computer software and specifications that provides a software platform for developing application software and deploying it in a cross-platform computing environment. Java is used in a wide variety of computing platforms from embedded devices and mobile phones to enterprise servers and supercomputers. Java applets, which are less common than standalone Java applications, were commonly run in secure, sandboxed environments to provide many features of native applications through being embedded in HTML pages.

OpenJDK is a free and open-source implementation of the Java Platform, Standard Edition. It is the result of an effort Sun Microsystems began in 2006. The implementation is licensed under the GPL-2.0-only with a linking exception. Were it not for the GPL linking exception, components that linked to the Java Class Library would be subject to the terms of the GPL license. OpenJDK is the official reference implementation of Java SE since version 7.

<span class="mw-page-title-main">Microsoft Silverlight</span> Application framework for writing and running rich Internet applications

Microsoft Silverlight is a discontinued application framework designed for writing and running rich internet applications, similar to Adobe's runtime, Adobe Flash. While early versions of Silverlight focused on streaming media, later versions supported multimedia, graphics, and animation, and gave support to developers for CLI languages and development tools. Silverlight was one of the two application development platforms for Windows Phone, but web pages using Silverlight did not run on the Windows Phone or Windows Mobile versions of Internet Explorer, as there was no Silverlight plugin for Internet Explorer on those platforms.

<span class="mw-page-title-main">JavaFX</span> Java software platform for GUI

JavaFX is a software platform for creating and delivering desktop applications, as well as rich web applications that can run across a wide variety of devices. JavaFX has support for desktop computers and web browsers on Microsoft Windows, Linux, and macOS, as well as mobile devices running iOS and Android, through Gluon Mobile.

The Java Class Library (JCL) is a set of dynamically loadable libraries that Java Virtual Machine (JVM) languages can call at run time. Because the Java Platform is not dependent on a specific operating system, applications cannot rely on any of the platform-native libraries. Instead, the Java Platform provides a comprehensive set of standard class libraries, containing the functions common to modern operating systems.

IcedTea is a build and integration project for OpenJDK launched by Red Hat in June 2007. IcedTea also includes some addon libraries: IcedTea-Web is a free software implementation of Java Web Start and the Java web browser applet plugin. IcedTea-Sound is a collection of plugins for the Java sound subsystem, including the PulseAudio provider which used to be included with IcedTea. The Free Software Foundation recommends that all Java programmers use IcedTea as their development environment.

<span class="mw-page-title-main">Moonlight (runtime)</span> Implementation of Microsoft Silverlight for some Unix-based operating systems

Moonlight is a discontinued free and open source implementation for Linux and other Unix-based operating systems of the Microsoft Silverlight application framework, developed and then abandoned by the Mono Project. Like Silverlight, Moonlight was a web application framework which provided capabilities similar to those of Adobe Flash, integrating multimedia, graphics, animations and interactivity into a single runtime environment.

The Java Development Kit (JDK) is a distribution of Java Technology by Oracle Corporation. It implements the Java Language Specification (JLS) and the Java Virtual Machine Specification (JVMS) and provides the Standard Edition (SE) of the Java Application Programming Interface (API). It is derivative of the community driven OpenJDK which Oracle stewards. It provides software for working with Java applications. Examples of included software are the virtual machine, a compiler, performance monitoring tools, a debugger, and other utilities that Oracle considers useful for a Java programmer.

<span class="mw-page-title-main">.NET Framework</span> Software platform developed by Microsoft

The .NET Framework is a proprietary software framework developed by Microsoft that runs primarily on Microsoft Windows. It was the predominant implementation of the Common Language Infrastructure (CLI) until being superseded by the cross-platform .NET project. It includes a large class library called Framework Class Library (FCL) and provides language interoperability across several programming languages. Programs written for .NET Framework execute in a software environment named the Common Language Runtime (CLR). The CLR is an application virtual machine that provides services such as security, memory management, and exception handling. As such, computer code written using .NET Framework is called "managed code". FCL and CLR together constitute the .NET Framework.

<span class="mw-page-title-main">Mono (software)</span> Computer software project

Mono is a free and open-source .NET Framework-compatible software framework. Originally by Ximian, it was later acquired by Novell, and is now being led by Xamarin, a subsidiary of Microsoft and the .NET Foundation. Mono can be run on many software systems.

<span class="mw-page-title-main">.NET</span> Free and open-source software platform developed by Microsoft

The .NET platform is a free and open-source, managed computer software framework for Windows, Linux, and macOS operating systems. The project is mainly developed by Microsoft employees by way of the .NET Foundation and is released under an MIT License.

Microsoft, a technology company historically known for its opposition to the open source software paradigm, turned to embrace the approach in the 2010s. From the 1970s through 2000s under CEOs Bill Gates and Steve Ballmer, Microsoft viewed the community creation and sharing of communal code, later to be known as free and open source software, as a threat to its business, and both executives spoke negatively against it. In the 2010s, as the industry turned towards cloud, embedded, and mobile computing—technologies powered by open source advances—CEO Satya Nadella led Microsoft towards open source adoption although Microsoft's traditional Windows business continued to grow throughout this period generating revenues of 26.8 billion in the third quarter of 2018, while Microsoft's Azure cloud revenues nearly doubled.

References

  1. Microsoft and Novell Announce Broad Collaboration on Windows and Linux Interoperability and Support
  2. "Statement on the blog of Mono project leader Miguel de Icaza regarding patent protection for Mono". 2006-11-04. Retrieved 2006-11-06.
  3. Stallman, Richard (2009-06-26). "Why free software shouldn't depend on Mono or C#". Free Software Foundation . 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.
  4. "Microsoft's Empty Promise". Free Software Foundation. 2009-07-16. Retrieved 2009-08-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.
  5. 1 2 Microsoft takes on the free world.
  6. Microsoft still open sources more technologies than many think
  7. Microsoft open sources more of its .NET technologies
  8. The F# Software Foundation
  9. .NET Foundation Projects
  10. "Xamarin partners with Microsoft to deliver .NET everywhere". Archived from the original on 2014-09-01. Retrieved 2014-08-29.
  11. core: Home repository for .NET Core, .NET Foundation, 2018-01-14, retrieved 2018-01-14
  12. Mono Applications? Aplenty!, OSNews
  13. "Usage of server-side programming languages broken down by ranking". W3Techs.com. Retrieved 30 May 2015.
  14. 1 2 Java EE SDK 5 Update 2 No JDK download page (reference to license agreement) [ permanent dead link ]
  15. Mono: ASP.NET
  16. Mono: ASP.NET
  17. "HD-DVD vs. Blu-ray, round 2". Archived from the original on 2007-03-08. Retrieved 2007-04-23.
  18. Format Wars - Blu-ray vs HD DVD
  19. Zaharov-Reutt, Alex (2008-02-21). "Microsoft's HDi interactivity layer loses from HD DVD's death - but does it matter?". itwire.com. 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[ dead link ]
  20. Microsoft article that refers to C# as its "flagship" language.
  21. "Visual Studio Express". Microsoft . Archived from the original on 2011-06-12. Retrieved 2010-12-03.
  22. Visual Studio Community
  23. "Dear Microsoft". 2008-01-09. Archived from the original on 2008-02-05. Retrieved 2008-02-03.
  24. ".NET framework 3.5 size 166MB!". 2007-11-10. Archived from the original on 2008-02-05. Retrieved 2008-02-03.
  25. "Fedora embraces Mono - ZDNet UK". Archived from the original on 2007-12-27. Retrieved 2007-04-19.
  26. Debian Mono Packages
  27. 1 2 Wikipedia Uses Mono; Mono Integrated into Ubuntu/Debian - OSNews.com
  28. "Fedora Catches Mono". Archived from the original on 2007-04-05. Retrieved 2007-04-19.
  29. "SUSE 10.1 released". Archived from the original on 2006-12-11. Retrieved 2007-04-19.
  30. "Mono – Plans" . Retrieved 2008-12-23.
  31. "Inside Mac OS X 10.7 Lion: Missing Front Row, Rosetta and Java runtime". AppleInsider. February 26, 2011.
  32. "Java Downloads". Apple Inc.
  33. "Information and system requirements for installing and using Oracle Java on Mac OS X". Oracle Corporation.
  34. "Package: openjdk-6-jdk". debian.org. 2009-02-14. Retrieved 2009-02-16.
  35. Wade, Karsten (2008-03-13). "OpenJDK in Fedora 9!". redhatmagazine.com. Archived from the original on 2008-04-21. 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.
  36. Mandriva Java package
  37. "Package: OpenJDK". opensuse.org. Archived from the original on May 27, 2009. Retrieved 2009-06-01.
  38. "Slackware Java package". Archived from the original on 2008-06-10. Retrieved 2018-10-31.
  39. "openjdk-6 in Ubuntu" . Retrieved 2008-04-19.
  40. Reinhold, Mark (2008-04-24). "There's not a moment to lose!". Archived from the original on 2008-04-29. Retrieved 2008-04-19.
  41. Sharples, Rich (2008-06-19). "Java is finally Free and Open". Archived from the original on 2008-06-20.
  42. Angel, Lillian (2008-03-13). "OpenJDK to replace IcedTea in Fedora 9". Archived from the original on 2008-04-18. Retrieved 2008-04-05.
  43. Operating System Distributor License for Java (DLJ) [ permanent dead link ]