.Net v/s Java Revisited
Posted On January 8, 2006 by Priyadarshan Roy filed under Miscellaneous
It is a battle between positive idealism and deliberate pragmatism. On one side there is a proven technology, time tested and evolved out of shackles of proprietary technologies. On the other side, there is a technology that is fuelled out of need to beat the first one, and is coated with sugary marketing hype, and is tightly attached to a popular yet proprietary platform.
Yes! In a nutshell, that is how we define the battle between Java and .Net. It is not a David versus Goliath battle. It is a battle between two Goliaths! And like any classic battle it is still being fought on mind share rather than market share.
It is impossible to sound diplomatic when you analyze two-way battles between highly polarized forces. Yet we make an attempt to analyze where things stand between the two technologies with an eye of the third umpire.
There has been several attempts made earlier by umpteen writers, analysts and experts on who will win the war of web services in the past two and a half years. When it started, Java was an established platform, while .Net at best existed in marketing brochures of Microsoft. Few in the MS pavilion really understood what it stood for.
Today Microsoft has successfully shipped multiple versions of Software Development Kits on .Net. It has shipped a successful development tool kit called Visual Studio.net. And in a few months they will ship a full-fledged operating system that integrates the technology. And within the year they will have their 11th edition of Office .Net enabled.
In two and a half years, Microsoft has been selling hyperware to their developers, but all of a sudden they have number of shipping products, or products-in-waiting. Java supporters have always argued in two and a half years, that Micorosoft .Net was all hype. They cannot do that any more!
Another major criticism which development community has against Microsoft .Net is that .Net copies Java platform, and is a Java clone in a Microsoft dress. This is almost true, but that does not help the battle scene in any way. After all everything is fair in love and war.
Microsoft has always modeled their products taking the best of features of existing products. Whether it was DOS, Windows or Excel, this is an art, which MS has excelled in. But they not only take the best features, but also improve up on them, and package it neatly for you and me, to use it better.
Fundamental differences
While Java and its different versions, and .Net promises the same thing, they differ in approaches at least as of today. First of all Java is platform independent! This means that you can run Java on any operating system of your choice. From mainframes to palmtops you have Java Virtual Machines available. If fitted into memory properly, the same code can theoretically run on any platform as long as the Java Virtual Machine is present.
Now the Java Virtual Machine is free as in freely downloadable. So a user essentially does not have direct overheads in using a Java application. That is the biggest strength of Java. Hence Java is language specific. However you need to remember that Java is the most popular programming language today!
About two years ago, Sun reorganized the Java platform into three profiles:
- The Java 2 Platform, Micro Edition (J2ME), for handheld and other lower-end devices
- The Java 2 Platform, Standard Edition (J2SE), targeted at desktop machines
- The Java 2 Platform, Enterprise Edition (J2EE), installed on servers and responsible for the heavy lifting in the Java world.
Usually analysts and experts compare J2EE with .Net. We however will group all platforms under a common Java brand name in this article.
But if you need to develop a product that supports Java, you can only program in Java. Java currently does not offer any other options. There are some plug-ins and modules available, which makes languages like Python and C understand Java better. But even that is very limited.
.Net is however platform dependent! You need to have a platform that supports the .Net SDK. Microsoft's Windows 2000, XP and even 98 platforms support .Net and at this point of time it is limited. Microsoft is supporting an Open Source initiative called Mono, which provides .Net capabilities to Linux. It is still very primitive.
Hence .Net is platform dependent. But remember 90% of desktops and 30% of servers run on MS platforms. However, .Net is not language specific. If your code adheres to .Net standards you can compile them to run on .Net using most of the languages including C, Cobol, Java, Basic and others.
There are about 17 languages that support .Net as of today. And this promises theoretically code re-use. Hence to a large extent, .Net is language independent. Microsoft's Common Language Runtime (CLR) technology lets the developer use code written in other languages (provided they all talk .Net) in your program. So developers writing a program in say C#, can make use of code written in a language like VB.Net.
Now .Net costs! You need to pay for almost everything from operating systems, development tools and even database. This where Microsoft makes money! At this point of time there are few stable products that can help you to create .Net applications free of cost!
That sums up the major differences between .Net and Java. It is a very difficult task to balance between platform independence and language independence. If you can master the Java language you will stick with the Java platform, if you cannot and if you love programming in any other language, then .Net may be the choice.
Benchmarks
Benchmarking gives you an idea how you can measure performance between different products and technologies. Though we personally feel that less weightage has to be given to benchmarks, in a two way battle like this benchmarking has to be considered. However it is important to remember that no decision can be taken just by comparing benchmarks in the real world.
For J2EE and .Net, the benchmarking battles kicked off in June 2001, when Oracle published benchmark numbers showing Oracle 8i's performance with an unnamed J2EE server on a modified version of Sun Microsystems' Pet Store Demo training application. Microsoft published test results that, it claimed, showed a dramatic performance improvement over the Oracle numbers.
Soon BEA and Macromedia had released Pet Store benchmarks of their own repudiating Microsoft's findings, and Pet Store, despite that it was created as a teaching tool and not a performance benchmark suite, was fast becoming the standard for the J2EE/.Net benchmarking wars.
In mid 2002, The Middleware Company a pro-Java vendor conducted a series of tests based on the Pet Store Demo between two J2EE Servers and a .Net Server. The tests showed Microsoft win hands down, creating a lot of furor in Java community.
The most startling facts were:
1. To write the same application on J2EE platform it took seven times more code than .Net.
2. The total cost of the solution from Java's side was twice as much of Microsoft.
There was however a lot of criticism to the way the test was conducted, as much as the people in the Java community felt that Java code was not optimized properly. There is now talk on re-match and currently The Middleware Company is talking to some of the J2EE vendors to support the initiative. Microsoft seems to be confident and ready. But should we take these benchmarks seriously. We suggest you not to, for many reasons. Anyways for the believers and kafirs, you can check this link and draw conclusions, http://www.middleware-company.com/j2eedotnetbench
Vendor backing
Now let us look at the vendor support. Both have reasonable bench strengths. However in terms of the big names, Java has more numbers. The biggest name in the Java camp is of course IBM. IBM is seen championing the Java cause so aggressively, that many get a feel that IBM innovated Java and not Sun.
Oracle is another major force in the Java community and along with Sun and IBM, forms an unbeatable trio in the enterprise space. There are other bigger names such as Borland, BEA, Macromedia, etc. who are strongly supporting products running on J2EE technologies. In the next tier there are hundreds of smaller vendors shipping different applications that use Java including our own Pramati Technologies.
Microsoft and its huge developer network partners form the .Net pavilion. Microsoft of course ships almost all critical tools that are required to build .Net applications today. It has roped in several compiler and RAD tool vendors such as Active State, Borland, Fujitsu, etc. who are building development tools that can create .Net applications. At this point of time we do not see many strong J2EE vendors shipping .Net-enabled products. But six months from now, it could be a different story.
Open Source factor
Java has found tremendous support from open Source community. Though Linux developers use multiple languages to write applications, ideas such as openness and platform independence has favoured Java a lot. This is where Microsoft .Net fails. The Microsoft business model somehow eschews the Open Source philosophy. Though the Project Mono developed by Ximian is expected to help .Net applications run on Linux, many in the Linux community are viewing the project with suspicion. The opinions are mixed, judging the comments posted in different web sites.
Meanwhile Microsoft is working with vendors such as Active State to bring popular Free Software under the .Net umbrella. But the progress we understand is not satisfactory. Java Community process pulled a rabbit out of the hat when it announced that Open Source developers who are not for profit business models could become members of JCP without licensee fees. This has resulted in several thousand Apache developers embracing Java.
Moreover tighter integration of 'Free Software' with Java is happening.
Java scores heavily over .Net in the open source world. If .Net needs to catch up, which we feel, it should fund some more projects in the Open Source world. A tough decision for Microsoft, as it sees Linux and Open Source as Enemy No 1.
Communities
When we started this article we talked about the importance of mind share. This is hence the most important factor in this battlescene. Now the Java Community and Microsoft developer community are distinct in their approach to development. While the Java community has evolved largely out of developers who were once developing for and on proprietary technologies, the Microsoft developer network has developers who have been writing code and using interfaces that is extremely familiar to Windows based development.
The Java developers, who tasted Open architectures, will rarely switch over to any other platforms. These are the guys who spent years hacking code in IBM, Fujitsu or Sun machines, where a code written for one system was never meant to work on other platforms. These developers are too idealistic to make a shift.
Then there are several developers who jumped on Java bandwagon, for the green bucks during the boom period. They are not that committed and can switch sides. Microsoft has developed C# as a Java like language and has hyped it as a Java killer. There are predictions made that C# can and will be the most popular programming language for Internet programming in the next 2 years. We see some of the Java developers at least learning C#, if not using them. But the majority should stick around with Java.
On the other side, there has been little or no choice for the Microsoft Development community. It has been a steady diet of different Microsoft technologies, as it rolled out of Redmond, for them. According to our studies it is very difficult to get a MS developer who is used to the Visual Studio IDE to look at other tools. Microsoft has lost a lot of developers to Java in the past. That migration will still be there merely because Java offers more variety and access to the tools and are free in most cases. That is where platform independence scores over language independence.
However, overall, an MS developer will stick to home ground as far as opportunities exist.
Ease of development
This is a slightly controversial issue to have conclusions. An experienced C programmer can claim that he knows and likes this language as well as his mother tongue. But many find it the toughest language to master.
The same applies with Java. Microsoft .Net tools, though is still in its infancy, offers tremendous advantage in development, because every thing is planned, designed, developed and shipped from the same company and is built on the legacy of having total control of operating systems, applications and development tools. While Java has a plethora of tools for development, there are so many good and bad ones out there. It looks like with the launch of Visual Studio 2003, Microsoft may have the edge here.
The legal coup
Sun Microsystems has won a legal battle, which is forcing Microsoft to ship the Java Virtual Machines along with their PCs. This definitely gives an advantage to Java ensuring that applications written in the language can be rendered in an Internet Explorer browser.
Conclusion
The scores appear even, though Java has the advantage of being time tested and being platform independent. At the same time, Microsoft has the large number support and infrastructure to power its way through.
The Gartner group feels that both technologies will have abut 40% market share by early 2005, and rest of the market will continue to survive unaffected by the world of XML Web Services, Java or .Net. As we conclude this article, we feel like agreeing with that prediction! Mind you, we are not being diplomatic.
