How a LAMP developer learned to stop worrying and love Ruby on Rails

by

One of the most raging debates within the web developer community is LAMP vs. Ruby on Rails (RoR), with countless posts all over the Internet that debate the merits of one versus the other… but this blog entry isn’t going to be one of them.  You see, I’m new to RoR and hesitate to call myself an LAMP expert. So I’ll just discuss my own experience going from working on PHP-based sites to working on RoR-based sites.

I realize that PHP is a language and RoR more of a framework. I’m sure there are a lot of good PHP frameworks that better stack up to RoR. However, I am comparing my experience working on a LAMP app “out of the box” versus a RoR app.

I’m primarily a front-end UI developer, but a few years ago I worked for a client with a site built on LAMP, and acquired extensive experience building PHP classes and writing MySQL database queries along with my usual HTML coding and CSS styling.  I was planning to continue down this path, but sometimes you need to think outside your preconceived plans for your career path and prepare for the unexpected.

For the past few months, I’ve been doing extensive client-side jQuery programming and some light front-end Ruby coding on a Rails platform, and I’ve come to embrace my new role.  One can argue forever over whether PHP or Ruby is better, but at the very least, Ruby offers a refreshing change of pace after working with PHP at my previous jobs.

For example, Rails has a templating system that is more organized than what PHP has to offer.  With PHP, you can include one file within another.  But with Rails, you can have designated partial files marked with an underscore at the beginning of the filename. Also, another favorite feature of mine is the use of js.erb files, which makes it easier to integrate back-end Ruby code with client-side jQuery. PHP, as far as I know, does not offer an equivalent to this.

Ruby on Rails used to have Prototype as its default Javascript library, but as of version 3.1 they have switched to jQuery.  As the web continues to grow more dynamic and move beyond static HTML and CSS, it is becoming much more dependent on Javascript libraries, and of these, jQuery has become by far the most popular.  So when I started being put on projects involving sites built on Rails, jQuery became a much bigger part of my job duties.

Are there things I miss about PHP/MySQL?  Sure.  I miss working with database queries.  There’s a certain amount of satisfaction in being able to take a more hands-on approach to linking back-end data with front-end content.  But I’m getting equal satisfaction in being able to make the front-end user interface much more dynamic using jQuery and Rails.

Overall, I for one welcome my new Ruby on Rails overlords.

Leave a Reply

Your email address will not be published. Required fields are marked *