Why I’ve Moved From PHP to Ruby

This year I’ve started playing with Ruby and Rails. Once I had put together some basic demo apps I realized how much faster it is to use Rails instead of PHP. I’ve been discussing this with one of our sysadmins at work and I realized what I like most about Ruby (and Rails) is the culture of the Ruby community.

First off, there’s a strong bias towards testing. With RSpec and Cucumber you can easily work in a BDD style of development. I’m reading The RSpec Book right now and it’s fundamentally shifting the way I develop software, especially after seeing what Josh Kerievsky had accomplished with his company using thorough test coverage as the foundation for continuously deploying their product. The Rails 3 In Action book also illustrates a behavior-driven approach to developing Rails projects.

I find the BDD style more intuitive to grasp than TDD and it feels like a natural progression to me. Ruby, from what I’ve seen (and please correct me if I’m wrong!), has the best BDD support with RSpec and Cucumber.

Then there’s the focus on DRY (Don’t Repeat Yourself) which is inevitably mentioned in any discussion about designing Rails software.

The last big advantage which puts Rails above PHP is the sheer number of plugins and gems available to the Rails developer. Since there’s one dominant framework in the Ruby world all the plugins and gems are written to work with it. PHP, with it’s multitude of competing frameworks, doesn’t have anywhere near the number of pre-written plugins to solve issues like adding roles and permissions to your site or put together an e-commerce site.

All this points to one fact I’ve learned after years of working in PHP: it’s faster to develop robust, high-quality websites in Rails.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

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

Powered by WP Hashcash