Ruby On Rails

Why we (still) believe in Ruby on Rails

Ruby on Rails

Arthit Hongchintakul
19 November 2014

In this day and age, everybody has their own version of web framework. Name any programming language, you will probably find a web framework written with it. Ruby on Rails has been around for quite a while. In the beginning, there’s nothing quite like it. Today, everybody builds from it, inspired by it, either by its genius or its shortcomings. We believe that Rails is still a great tool, and will stay relevant for years to come. Let me explain why.

Solid foundation

Rails is built from the ground up in Ruby. Ruby is a programming language that the primary focus is to be natural. This means a lot to a developer. It is easy to learn. It is easy to write. Most important of all, it is easy to maintain. Ruby, as with all modern programming languages, comes with a solid testing tool that allows you to test things from the very bottom up to the very top level. It makes Ruby a very strong candidate for an Agile project. Not only that, when you get pass the journeyman to the master level, Ruby still have a few more tricks up its sleeve. And if it runs out of trick, you can extend Ruby to have a trick of your own. You can even run Ruby code on Java VM

Active, open community

Ruby is by nature an open source language. If you write in Ruby, you will deploy the source code for the software to operate. It is inherent in interpreted language. This implicitly enforce the open nature of the language. It, in turn, influences people to be more open with their code. Rubygems, the Ruby library repository, provides all kinds of functionality you imagine. How fast can you write a solid authentication system? Ruby already provides two competing flavors: Authlogic and Devise. How about authorization system? Cancan. Photo uploads? Paperclip. Want a nice UI quickly? Sass, Less, Bootstrap, Foundation, you name it. Want fancy front end behavior? jQuery, Angular.js. Various different backend? MySQL, Mongodb, Mongoid, Redis, Couch. Need SOA? REST, SOAP. You can even do a push technology very easily with Juggernaut or Websocket and background processing with Resque, or Delayed Job. All these libraries are actively maintained. Updates are frequent, up to a point where users need to make an effort to catch up sometimes.

Strong Agile Principle

Rails takes Test Driven Development very seriously, up to a point that three titans argued how best to test code. Rails comes built-in with strong testing infrastructure and tools. There are third party libraries that will allow you to perform a great  variety of testing methods. There are Rspec, Capybara, and other tools that will test your software more thoroughly that you previously can. Done properly, release cycles can be shortened and defects reduced greatly by automating the regression suite. Developers have a strong ground to stand on when they need to perform code maintenance, refactoring, and implementing new functionalities. Of the four values of Agile Manifesto, we already achieve two with just using the tools – working software and responding to change.

Great obstacles, and great collective power to overcoming them

Every search for a hero must begin with something which every hero requires, a villain. If you have deployed Rails in a production environment in the early days, you understand the statement. For a long time, it is hard, if not impossible, to properly maintain a stable set up for Rails, both in development and in production. We had plugins, then we had gems, then we had different versions of plugins and gems, then we had difference in setting up on different platforms such as Mac OS or Ubuntu development workstations and RHEL production servers. Once in production, capacity and scaling become major concerns with Ruby green threads. And then Github got hacked. Ruby and Rails communities don’t let problems linger for long. That’s because the foundation that it is built upon allows super fast turn over with super small number of defects. New test cases are added. New code is implemented. The whole regression is run. The new functionality is deployed without breaking old ones. Combine this with the fact that Ruby enjoys a very strong open source community, it becomes very powerful. We had Mongrel, then Thin. We have Phusion Passenger. We have Unicorn. We have Puma. To put it all together, we have Capistrano for deployment. We have Puppet or Chef for configuration management. Dream up something you need done, chances are there already is a Rubygem for it. All this is built in Ruby. We even have rvm, rbenv, and chruby. Today, it is up to a point where a team can do a few mouse clicks and get a new workstation ready, and a few more clicks to scale up the production environment.

Yes, I agree with you that [insert your favorite language and framework here] is awesome, or may even be better than Ruby on Rails in many aspects. However, with all the strength combined, Ruby on Rails is still my tool of choice for industrial strength web application, at least for a few years to come.