Comparison of the Java & .Net Platforms
Both Java and .Net offer object oriented programming and architecture and extensive framework classes from which to develop applications. The basic philosophies driving both platforms differ, however. Java, with the slogan of "write once run anywhere," attempts to be a single language which, once compiled, will run on any hardware and under any operating system. Compiled .Net programs, on the other hand, will run only on Windows, but can be written in any number of different languages (C#, VB.Net, J#, C++, etc.). This basic difference effects nearly every aspect of the two platforms.
-
Framework Classes
-
Because the .Net platform has direct access to the Windows operating system API (Application Programming Interface), its framework classes can be richer. Anything that a Windows text box can be or do, for instance, is available to the .Net programmer. Java, which has to work on any machine and under any operating system, has to rely on lowest-common-denominator expectations and its framework classes can only offer the most rudimentary options. As a result .Net programs, especially those that have complex graphical user interfaces, are often easier to create while Java programs require either extensive coding or the adoption of third-party tools.
Multi-Platform Ideal
-
While the goal behind Java's "write once run anywhere" philosophy is laudable, in practice it does not always work. Despite the best efforts of those developing Java, differences between operating systems and hardware have crept into the Java platform and multi-platform programs are often a chore to debug. On the other hand, .Net development is only slightly better as differences between different versions of Windows can cause similar problems.
-
Cost
-
Java has the advantage, at least at the outset, of being free. The language and the platform are open source and most of the development tools that Java uses are open source as well. However, many of the enterprise level extensions to the language are not free and can be quite costly. For basic Web development, Microsoft offers free .Net tools, but for most serious applications, Visual Studio licenses need to be purchased for developing in .Net. The majority of cost analyses give .Net the edge when it comes to long-term cost of ownership.
Developer Knowledge
-
Because it is freely available and works on multiple platforms, universities teach Java more often than .Net. Thus, a comparison at veridicus.com argues that by adopting the Java platform an IT department is more likely to attract more formally trained and disciplined developers. Java, because it has been around longer, also has a greater volume of help available online in the form of discussion groups, forums and tutorials.
-
References
- Photo Credit Stockbyte/Stockbyte/Getty Images