.NET and the choice against Java
The .NET framework (pronounced Dotnet) is a runtime environment for software, created by Microsoft. It runs on Windows and Linux.
.NET offers a library of
functions for graphical interfaces, data access, networks and Web
applications, plus compilers and a virtual machine.
Components of .NET
Programmers under. NET enter a universe of systems and components to use.
- WPF. Windows Presentation Foundation.
An interface that includes 3D graphics, used by Windows' Aero. - WCF. Windows Communication Fondation.
A messaging system for communication between computers. - WWF. Windows Workflow Foundation.
For tasks management. - CLR. Common Language Runtime.
Virtual machine that executes the same code on various hardware. - Class library.
Divided into namespaces. - CIL. Common Intermediate Language.
Intermediate standardized language produced by the compilation of advanced languages, and interpreted by the CLR virtual machine. - Assembly.
An assembly is stored into a PE (Portable Executable) file, and contains the code in intermediate language. - Winforms. Windows Forms.
Graphic interface components. - CardSpace. A component for secure access codes on the Web.
In fact the programmer is primarily concerned with the choice of a programming language and tools to compile and APIs available to build the application.
The following languages work on .NET: Ada, APL, Basic, C#, C++, COBOL, Eiffel, Fortran, Haskell, Oberon, Objective Caml, Pascal, Perl, Python, Ruby, Scheme , SmallTalk. A full list is given in the CLI article (see block at bottom).
The XAML language is integrated into the system and lets you describe graphical interfaces in the XML declarative language.
Java vs. .NET? Which platform to choose?
To build an application now should we choose Java or. NET? Compatibility and richness of functionalities are the keys to a better choice.
Java
Since November 2008, Java is under a open source license, GPL, partially (the mobile version is not).
Many programming languages have been ported on this platform and are compiled to bytecode interpreted by the JVM. This includes Python and Ruby.
From there, a question arises: do we still need to Mono on Linux, and should we choose a tool based on a Microsoft proprietary technology that never beats the original, rather than a free and fully portable platform?
.NET and Mono
Mono is a version of .NET 2.0 compatible with Linux, made by Novell, followed by Xamarin. It is portable: it can run on any UNIX, MacOS and Windows. There is a version of .NET for all systems which opens the way for Web applications on this platform.
An advantage of Mono is that it is possible to compile C# into native code for Linux and Windows, the exact same source code, performing the same games as shown Unity, which is specialized in games for Mono. They also work on mobile phones and game consoles.
After the acquisition by Attachmate of Novell, the Mono development team has decided to form an independent company, Xamarin. They plans to continue the Mono project and provides commercial version for the main OS smartphone including Android and IOS. More information on Tirania.org.
Silverlight or JavaFX
Mono and .NET have another advantage that is Silverlight, a Web technology using a lighweight multi-browsers version of .NET, and Mono provides a Linux port, Moonlight.
For its part, Sun supports JavaFX, which does not have the same ease of use than Silverlight and that is not based on standards like HTML 5, but which is based on a platform compatible with all systems...
Choosing between Java and. NET server side can be combined with a choice between JavaFX and Silverlight for web pages.
Silverlight is abandoned in the Metro interface under Windows 8 and replacer by HTML 5 + JavaScript or XAML + native languages.
Mobiles
The Java virtual machine, on pay phones, is supplanted by Dalvik, an alternative interpreter for Android which is ported to other OS too.
In this universe was have rather a choice between Android or Windows Phone 7 or Windows 8, so Dalvik + Java against. NET + Silverlight.
Conclusion
Java comes with the advantages of seniority: stability, community, documentation, many development tools while .NET offers more openness: multiple languages, new ideas.
The question of compatibility appears to fade with time, the two platforms trends to be both more portable and universal.
Under Windows 8. NET is kept for legacy applications, but is replaced by a subset for immersive applications on Metro. And Metro is the preferred interface for future Windows applications.
Informations and tools
- Download .NET.
- Silverlight. A .NET runtime is included among downloaded files.
- Visual Studio Express. IDE to build .NET applications.
- JSC. Recompile .NET assemblies to JavaScript, PHP or Java.
| Tweet |
|