Sunday, July 29, 2007

Java or Rails?

It was almost one year ago. I was trying to decide which mvc framework to use for my new web project. I had implemented my last project in Java (www.touchlocal.com). And I was a big Java fan; in some ways I still am.
But on the other hand, I was growing frustrated with certain aspects of the Java community.
Thinking back, I now realize what pushed me away from Java was Hibernate. Yes that great ORM tool. You know the old adage: 'you concentrate on your business logic, let us take care of the low level stuff'. With hibernate, this became: 'you can't concentrate on your business logic, you first have to figure out how to use the new version of hibernate'.
And it was the same with tools like Maven. Your old project is with Maven 1.0.x; by the time you start the new project, Maven 2.0.x is out...Well you first have to figure out how to use that one.
It's a project build tool for god's sake, why do I have to keep figuring out how to use it?

Internet is a great information resource obviously. But it may also become your biggest obstacle if you are trying to make a decision. Try buying a new digital camera basing your decision on user reviews. You'll probably go mad. What you need is a review written by your clone. Or if you believe in parallel universes, you have to figure out how to tap into that.
How can I decide which camera to buy by reading reviews written by a professional photographer? Isn't his insight useful? Well not to me necessarily.

I kept reading about Java frameworks first. I tried JFC, Tapestry, Wicket, Stripes...
Stripes was the one that won my heart. But I was still not at ease with my decision. Then I took a turn...And decided to give Ruby on Rails a run...

And that turned out to be one of the best decisions I've ever made.

ROR is a pleasure to write a web application in. I'm sure you've already read about 10x productivity gains...And you are curious whether that's true. Trust me it is...At least 10x.

'But what about all I've read about ROR being slow' you might ask. I personally haven't had any problems with that either. And we are running a high traffic site with a lot of back-end processes.

Ruby is a great programming language. Programming is more fun with a functional programming language. You feel more like god (you know what I'm talking about).

And if you don't want to leave your favourite java libraries behind, then there is JRuby for you.

If you are at the crossroads as I was a year ago, and you are trying to decide what to use; I say use RoR. You'll thank yourself. You'll love yourself. You'll become a better programmer.

1 comment: