Why I like Ruby on Rails
I’ve now been a professional web developer for more than eight years, and I had an interest in web technologies for some years before that. In that time, I’ve spent a substantial amount of time looking for something that would make my life easier, to make me more productive.
This all started when I learned Perl in my first year at university. I’d mostly be using basic HTML, CSS and JS until that point - my college courses certainly didn’t focus on anything more complicated than that.
I liked Perl, but it was hard to deploy to the sort of shared hosting that was all I could afford at the time, and it felt like a dying language (it still does, but the raw power that Perl supplies keeps people using it despite the rise of new technologies). I had trouble finding a CMS and forum package in particular.
I found PHP via phpBB, with which I ran a small forum for my friends for many years - it helped us all stay in touch as we moved away to university (remember, this was in the days before Facebook came along).
After I started working professionally, I started looking at other ways of doing things; this was in around 2006, so Ruby on Rails was very much in ascension at that time, and it caught my attention. It was certainly more attractive than some of the absolutely awful PHP code I was working with at the time, but as a junior developer I had no influence and not really enough experience to push things in another direction.
I picked up CakePHP instead, which was the closest thing I could find that still used PHP under the hood. Even then I ran into difficulties because my colleagues at the time didn’t understand how it worked, and weren’t willing to take the time to learn it.
But I still wanted to use Ruby. And I still liked the look of Rails.
Since then, I’ve changed company a few times, and every time I’ve done so, I’ve found working with PHP to be an exercise in frustration. Although it works, it’s not terribly elegant and most projects are stuffed so full of bad practices it’s hard to dig your way out of the mess. I’ve used many frameworks in PHP now, and even the best of them is a year behind Rails; CakePHP, Zend Framework 1, Prado, Zend Framework 2, Symfony 1, Symfony 2… they all pale in comparison.
These days, despite all of the attention being generated around NodeJS, I’m still convinced that Rails is good enough for most projects, especially since the release of 4.0 and up. Who wouldn’t want sensible defaults?
It’s always been a struggle to convince colleagues why they should use Ruby over something like PHP, especially when I’ve been working for a company that so far has only ever used PHP - it leads to a lot of circular reasoning:
- Why should I learn Ruby, when we only use PHP?
- Why should we use Ruby, when all our developers only know PHP?
- …and so on.
Maybe I just need some way to demonstrate why I believe Rails has the power to solve many of our business problems, and to do so faster than working with PHP. Maybe I need some sort of flashy example - but all that stuff is done in NodeJS these days, right?
For good or ill, Rails is now considered a mature framework; it’s a sensible choice for those who aren’t comfortable on the bleeding edge, but still want to use something that’s not PHP.
And for my part, I’m going to continue to use Ruby for my personal projects, and continue pushing for it at work.