Pages




Tuesday, July 26, 2011



Digg this

Java vs. .Net

Java
Well, it was only a matter of time before I had to post something about Java vs. .Net.  I have worked with both platforms and admittedly I have my own opinions.  But, unlike many who have strong opinions one way or the other, I have actually worked with both platforms.  Here's my take.

(1) If you are a Microsoft fan, if all you want to do is work with the Microsoft platform then .Net is for you.  Microsoft has integrated .Net pretty tightly into Windows and if you are 100% Microsoft then you do get some nice benefits out of the box with .Net.  However, if you work in a mixed environment or if you are developing a product that may have to run or inter-operate with other non-Microsoft platforms then Java has the edge.  Everything about Java is platform agnostic.  From the JVM's available to the multi-vendor support.  Java is about crossing boundaries. 
And these days, Java truly is write once, deploy everywhere.

There are some people who will argue that Mono makes .Net multi-platform too.  I would argue that while Mono is not officially supported by Microsoft, Oracle supports JVM's on every major platform (OS X, Linux, UNIX, and Windows).  Also, compared to the .Net Framework distributed by Microsoft, Mono is incomplete.  If you don't believe me, dig through the source code.

(2) If you are an open source person then Java is for you.  There are more open source projects available in Java then in any other programming language.  Java itself is open source with OpenJDK.  This means that originating open source projects typically exist in Java and more importantly (in my opinion), they come to Java first.  Consider many of the well-known open source projects for .Net: NAnt, Spring.Net, NHibernate, etc.  They are all ports of open source projects in Java available years before they were introduced to the .Net community.

(3) If you want so many options that your head spins then you want Java.  However, if you want one place to look for the bulk of your development needs then you want .Net.  This is more of a difference of direction than anything else.

The Java community is all about development meritocracy.  Some people prefer Eclipse, some prefer NetBeans.  Some people prefer JBoss and some prefer WebSphere.  And there are some people who prefer something else entirely.  In Java, there are usually more than a few choices for any thing you want.  The most well known typically bubble up to the top based on quality, support and acceptance.  The rest fall away.  Sometimes Oracle competes, sometimes it doesn't.  And there is always pressure to keep Java as "pure" as possible and not introduce unneeded functionality into the language thereby giving developers a choice - sometimes that means a LOT of choice.

Microsoft has taken a different approach.  And unlike the Java community with Oracle, the .Net community accepts Microsoft's position completely.  The primary resource for .Net is MSDN, delivered by Microsoft.  The primary resource for .Net open source is Codeplex, where code is not released under the GPL or the Apache License, it is released under a Microsoft license.  The primary IDE for .Net development is Visual Studio.  Almost all of the decisions with respect to .Net are Microsoft's.

As for me, I align myself more with the Java community.  I think development software should be free.  I don't think I should have to buy an OS or an IDE to have a good development experience.  I also don't want to "hitch my wagon" to a single company (i.e. Microsoft).  With Java, sure Oracle owns it, but the organizations who develop the Java platform are Google, IBM, and RedHat, to name a few.  And my final reason for favoring Java is that I have never worked in an environment that was 100% technically homogeneous.  Most places have Windows and some UNIX or Linux and some Windows or Mac and Windows, etc.  That's where Microsoft seems to struggle and that's where Java seems to shine.

2 comments:

Anonymous said...

Seriously though, .net still rocks

Clayton Long said...

Just because .Net is all that you know doesn't mean that it is the best.

Post a Comment