Wednesday, August 22, 2007

ASP.NET vs. JBoss, Hibernate, Spring, WebWork, Velocity, Sitemesh...

I saw this blog about Red Hat Developer Studio. There was this comment that struck a chord with me:
Wicket + Spring + Hibernate/JPA + Tomcat, all running in MyEclipse. JSF?
Seam? Ugh. Layers upon layers, and a configuration nightmare.

I love Java. I was working for Microsoft for almost 2 years and it was so refreshing to return to Java development. There is a rich community here and a lot of interesting things happening. That being said, I think our platform can be intimidating to newcomers because we have layers upon layers of abstractions for Web applications. Compare this to the competition, ASP.NET. They have one version of the truth. As a developer on the Microsoft platform, you have to learn a single web application technology, and you're set. Wherever you want to go work, they use the same thing. This leads me to the conclusion that from the standpoint of a business looking to hire developers, the cost for a Window's developers is cheaper because the chances of finding someone who is an expert at ASP.NET are better than the chances of finding an expert at Java web framework X. This worries me.

One thing I thought was odd about ASP.NET is they just seem to ignore the problem of ORM (Object-Relational Mapping). SQL Queries are happily embedded throughout various source files. Many .NET devs just don't see it as that big of a problem I guess. This is probably because Visual Studio provides a GUI for creating and editing SQL and binding data to UI elements.

It's actually really slick for about 75% of what you need to do. That last 25% is so painful. It's difficult to do something in ASP.NET that Microsoft didn't anticipate you doing. For example, in ASP.NET, you can drag and drop a few controls here and there and voila, you have a complete user management system with encrypted passwords and it hooks right into the form authentication scheme for your web app. However, there was one time I wanted to associate my users to a record in a database table in my application. It turned out to be ridiculously difficult since the user database was completely opaque because it was outside of my control.

I've found that Java web frameworks are technically more eloquent solutions. I believe this is because the most popular ones have fought their way to the top based on their merits instead of using a monopoly. But having a unified vision isn't so bad either. I like ASP.NET's simplicity for basic web apps. I wish we had that for Java.

No comments: