Thursday, September 27, 2007

"Rails", "Fails", and other controversial words that rhyme

I'd like to welcome a new member to the EffectiveUI team. Simon Horwith is a great addition, and he's going to be working on some great enterprise and government projects with us, as well as helping with training. I'm glad to have him around.

But, I couldn't let one of his latest blog post pass. He titled his post 'Rails Fails' for no reason that I can see. The original post about which his post was written is called '7 Reasons I switched back to PHP', and has made the rounds lately. I see nothing in that post about Rails failing qua Rails, so I can only assume that 'Rails Fails' was a title to stir the pot a little bit.

Here's my take on the original article: Derek's post boils down to two points that I can see:

  1. CD Baby had an existing data model and a lot of php code already in place.
  2. What CD Baby really needed was some solid refactoring, not a change of tools.
Rails is best when you're building from the ground up, because then you get to enjoy the benefits of the opinions of the creators instead of shoehorning a pre-defined structure into a Rails wrapper. Trying to migrate to Rails to get Rails benefits without having access to fundamentally change the processes and structure involved is scary to me. I'm not quite sure if that was what was happening with CD Baby, but it sounds like it.

It's never a good sign when someone says "All of our problems will be solved if we just change tools". That's never the case. It's a corollary to the old saw "If all you have a is a hammer, everything looks like a nail".

Derek is completely right to say that there's nothing Rails can do that PHP can't. That's the whole point to get from his article, not that Rails failed in any way. I'm glad he said at the end that if he were building a project from the ground up, he'd give Rails another go, because that's the place for it.

Rails isn't a tool to make your existing application easier to develop, nor is it just an ORM to throw on top of an existing data structure. Rails is a framework, a platform, and a set of opinions on how to apply those tools to a problem domain. No matter what the language (for the most part) those opinions can be applied to make development better in whatever environment you choose, and I think that's what Derek took away from his foray into Rails. I hope that's what everyone else takes away from it, too, and not some sort sense that Rails failed CD Baby, and could fail you too.

No comments: