Ruby on Rails and PHP

15 Apr 2005

It’s hard to be a web developer these days and not hear about Ruby on Rails. I’m not quite ready to give up on PHP yet, for reasons I’ll mention in a bit, but I am definitely interested…

What’s to like? Well, the scaffolding support is rather nice. To be honest, though, it would be nice if someone would post a tutorial or howto that doesn’t involve building a TODO list. :) But I digress… For example, after creating the obligatory TODO mini-app, I decided to point rails at my wishlist database which has a PHP interface. It’s pretty cool to have a working UI after running a couple of code generation scripts, and I can certainly agree with Justin French’s excitement for creating a quick and functional prototype. When you toss in stuff like Action Mailer, a lot of the grunt work with building web applications goes away. I’m always in favor of removing the development that’s “just typing” so I can spend more time on the more interesting “conceptual” or “problem solving” stuff.

So why not switch? Well, I’m sure inertia has something do with it, as I have a lot of time invested in PHP. For example, I have my own set of code that acts like Active Record, which, when used with generous helpings of ADODB, makes the object/relationship mapping something I don’t have to think about. Then I have my own code generation scripts that use that model to create the controller (and, to a lesser extent, the view). It’s certainly not as polished as RoR, and as Justin points out in his post, there’s a good reason to go with a framework that is being actively developed by a large group of people rather than to continue using something that only has your contributions, but it works well and I’ve gotten comfortable with it.

Then there’s the system set up. If you’re using TextDrive (which looks cool, BTW), then this isn’t a concern for you, but I’m hosting myself and so am responsible for infrastructure issues. Right now, PHP has the advantage in this area. Of course I expect Ruby to catch up eventually, either with mod_ruby working better than it does now (turning off the security controls to run Rails just didn’t feel that good to me), or with FastCGI getting a bit better (FastCGI on Apache is OK, not great, but on IIS is no fun at all). Currently, though, it’s much easier to get PHP installed and running (with acceptable performance) than Rails.

Finally, there is youth. Rails is still in its infancy. While that’s a great opportunity for getting in there and being able to make contributions to the core product (I have more ideas than I do time), it’s not so great when you have to do deal with significant changes happening to your framework. This will settle down a bit soon, I’m sure, but at the moment I’m still a little hesitant to use something at version 0.11.1. :)

RoR is cool though, so I’ll continue to watch it and play with it. Ruby is a fun language, and if this framework continues as it has commenced, it will get harder and harder to resist. :)


Actions

Informations

5 responses to “Ruby on Rails and PHP”

Loud Thinking (06:53:54) :

Comparing the infancy to your home-grown fruits

For all the flak I’ve fired at the old boys doing J2EE, it at least appears that they got one…

Curt Hibbs (07:14:38) :

Finally, there is youth. Rails is still in its infancy. While that’s a great opportunity for getting in there and being able to make contributions to the core product (I have more ideas than I do time), it’s not so great when you have to do deal with significant changes happening to your framework. This will settle down a bit soon, I’m sure, but at the moment I’m still a little hesitant to use something at version 0.11.1.

Don’t be put off by the version number… it’s misleading in two ways. The sequence of version numbers went 0.9.0 to 0.10.0 to 0.11.0—the jump to 0.10.0 looked like a backwards step to many people, even though that was not the intent. Rails is just a month or so off from its 1.0 release. Also, the core of Rails is pretty stable since 0.10.0—mostly new features being added. If you are short on time (as we all are), then you owe it to yourself to start working with Rails.

Ladislav Martincik (08:32:19) :

If you’re going to save a time with Ruby and “Ruby on Rails” though you still have to invest a time to learn and check changes, than it’s always worth to go in.

Loud Thinking (03:12:04) :

Rails extends warm welcome to PHP developer

Ben Curtis is concerned about the “significant changes happening” in Rails and how to cope with keeping up. We hear…

Pies (01:43:05) :

You might want to take a look at the framework I’m developing that aspires—as Richard Dawkins once wrote, one can specify goals without presumptions—to be the Rails of PHP. It’s Public Domain, so steal whatever you like. http://www.sputnik.pl/cake/