Archive

Archive for the ‘.NET n C#’ Category

.NET Project Blues…Java vs .NET

August 25, 2009 8 comments

By Chris L Hardin
Sr. Software Architect
It’s been almost 3 years since I have written a .NET project from scratch and I have to tell you, I am getting the itch. Don’t get me wrong, on any new project, I would choose Java hands down as the technology for the job due to one major factor…money, but a architect likes to keep his skills up.

This might be a good opportunity to list some of the reasons why I prefer Java/J2EE solutions over .NET solutions. Let’s look at a nice list and I’ll event throw in a few things that .NET is better at.

1. Java is more cost effective. You can do any Java project totally on the cost of writing the code. No purchases needed. Jboss or Tomcat for the Web/Application Server, Hibernate for the ORM mapping, Spring for the business layer and integrations and choose a great open source database like PostgreSQL and let me tell you…it rocks. Run it all on Linux servers. In .NET, I am going to get stuck for cost somewhere. The windows server, the database if I choose SQL Server, other components that Microsoft wants to stick me for. .NET does have a cost advantage in the area of developers. .NET developers typically make about 15% less than Java developers. I really can attribute this statistic to any one particular reason, however it is an advantage.

2. There is typically no difference between .NET and Java that you can name that make them night and day different. If a developed two applications,one in Java and the other in C#, you’d be able to follow them both easily if you know either language alone. I’d use nHibernate, Spring.NET and Spring MVC on the .NET side just like I would use Hibernate, Spring and Spring MVC on the Java side.

3. It is very easy to build a GUI in .NET with Visual Studio. Well, this is not really a fair comparison. Visual Studio is an expensive product and there is only one way to write a page in .NET and that is ASP.net. Java is more flexible, the good ideas are free…you know. I will say this though. If I had a requirement to build a fat client, I would download SharpDevelop and do it in C# before I would touch Java Swing. I’d rather had my head crushed in a vice than write Swing. Been there and done that. Also, I’d rather write an interface in ASP.NET using SharpDevelop than use Java Server “Feces”. My main preference is to write my front end in Dojo or some other Javascript framework and keep my front end neutral of .NET or Java.

4. VB.NET sucks…enough said. It should never have been allowed to live. .NET should have been C# only and if people still wanted to write VB, they just could stay on their old platforms and not upgrade. Now everyone thinks that VB will always be supported and it probably will…unfortunately. I prefer C# just because it is so much like Java. Don’t get me wrong, I like Perl, Javascript and Ruby too…just to let you know I am not completely bias. I know enough about VB to fill a small thimble, but I have seen it enough to know I hate it.

5. Hibernate and Spring are originally written in Java and ported to .NET later. There is always a wait for the latest version of nHibernate and Spring.NET.

6. EJBs are dead…get over it. I wrote em, I used em, I evangelized them… I let em go. Spring and Hibernate effectively killed them dead.

7. JSF is dying…get over that too…and Struts is dead as well. If you are looking at EJBs, Struts or JSF for a new project, you need your head examined. I’ve done many, many projects with these technologies, so don’t tell me I havn’t used them and don’t know what I am talking about. The Ajax craze is effectively killing page technologies like ASP,JSP…etc. Don’t even bother telling me, “Well there are Ajax components in JSF (ICE Faces) and in .NET. Go ahead put together an interface weave these components together and watch the different Ajax libraries clash at runtime. Just learn the Dojo, Ext, Google Web Toolkit, YUI frameworks and learn to use the widgets or hire me to do it for you.

8. Java is always going to be more advanced than .NET. It is always going to enjoy the benefits of more open source libraries in the language than you can shake a stick at because it is freely available and runs easier on more platforms. Unix/Linux servers are more stable, try to cobble a .NET project to run on one.

9. Microsoft changes it’s own standard when it sees fit, doesn’t matter to them if you have to change all your code. They change meaningless crap in the specifications their own browser supports, but keep VB.net. For cripes sake, I’d rather write an entire application in Intermediate Language.

10. C# is a clone of Java. Java was out there long before C# was even a gleam in some Microsoft engineers eye. C# was based on Java and it is no mistake that C# looks exactly like it except for subtle changes. The changes aren’t really big enough to call it another language in my opinion. I worked on a project once where I went back and forth all day. I had a minor stutter here and there but no major issues.

I think I started telling you something interesting and it developed into a rant on top of a soapbox. Although I do love Java, I do enjoy doing a .NET project every so often to keep myself at least versed enough to be able to explain what I am talking about. Imitation is the most sincere form of flattery. I guess I should be thankful that C# came out looking like Java rather than an advanced form of VB.

I’m just waiting for that next big language to come around like Java and C# when they came onto the scene. I thought Ruby was going to be it, but boy was I fooled. Ruby enjoys a great following, but I’d call it more of a cult. Now that I have said that I am looking over my shoulder for some Ruby zealot to smite me.

Categories: .NET n C#
Follow

Get every new post delivered to your Inbox.