An Entrepreneur’s Journey of Transformation

To PHP or to Ruby on Rails?

September 14th, 2007 Posted in PHP, Ruby on Rails, Programming

That is the question. I’m about to create a website that requires a decent amount of web programming. I’ve never actually created a web application from scratch. My experience is limited to editing other people’s PHP code. However, that’s a lie. I did program a massive project in ASP.NET when I was in college. The only problem is that it is ASP and I’ve forgotten it all.

I did some initial research, and I quickly narrowed it down to PHP and Ruby on Rails. From there it was a little harder.

PHP is like the father of the internet right now. There are just so many websites that use it and for great reasons. It’s fast, so web hosting providers can squeeze even more accounts into one server (shakes fist). It’s got a million a resources on the internet. Almost every open source application is in PHP. It’s fairly simple to get started.

However, there’s a problem. If you’re trying to do something more than just a simple script, you’re going to hit into some annoying snags. This is mainly because PHP wasn’t designed initially around object oriented programming. However, PHP 5 now has full support, but it is still an old way of programming. The code is messy and hard to follow especially if you’re an amateur. You have to do a lot of things manually over and over again.

Now here comes Ruby on Rails. Ruby has been around for awhile. It is this innovative approach to programming where many of the “busy” work is automated for you. Not only is it automated, the code adheres to standards. Anyway, geeks love Ruby.

Now the special part is in Rails, which is why they call it Ruby on Rails. Ruby isn’t a language designed for the web, so people created the Rails framework. They basically wanted to bring the power of Ruby onto the internet to make web development easier and better. The magic of Ruby on Rails is that they seamlessly integrate the database and things like ajax into a elegant Model-View-Control pattern. This probably won’t make any sense until you actually learn it.

It’s a totally different way of thinking.

The biggest barrier to adoption stems from many people’s existing proficiency at PHP. PHP now has frameworks that mimic Ruby on Rails. For example, cakePHP and Zend are a couple of the popular ones. However, quite a few people still say that Ruby on Rails is still better. The best way I can describe it is that it’s more elegant, which translates into cleaner and understandable code with less headaches.

However, it is generally accepted that if you are already good at PHP, you should just stick with it. If you’re not, go ahead and start learning Ruby on Rails. It’s really the future of programming.

I think Ruby on Rails is past the fad stage. In just under a year, documentation is appearing everywhere. It’s really looking like Ruby is here to stay. It’s going to be tough to compete with PHP, but for developers who want to do more in less time, I think it’s an incredible tool.

I’ve only started training, but I can already see the light.

I’m sticking with it, and I’ll let you know what happens.

Carl Zetterlund

  1. One Response to “To PHP or to Ruby on Rails?”

  2. By Will Powers on Nov 2, 2007

    I need to build 2 o 3 relatively simple websites in the next few months, (one of them asap), can you recommend any good sites that will teach me Ruby On Rails? Or a really good book? This sounds great, I want to learn it.

Post a Comment