Ruby on Rails was created in 2004 and Open Sourced in 2005 by David Heinemeier Hansson. It also was the framework used to create the now-superstar app Basecamp.
Now Ruby on Rails is used by a lot of (most of?) startups (Kickstarter, Airbnb, Bloomberg, Github, Shopify, to name but a few), and it’s not a real surprise given that the framework allows for rapid development and has an extensive collection of resources and libraries available.
But, to me, what’s impressive is how such a large framework has managed to stay relevant. To this date, it’s still one of the most relevant starting point for any web application development project.
1. Huge library collection, allowing us not to reinvent the wheel
Let’s face it. Most projects need the same kind of elements.
Your web app will need to read/write from a given database, it will probably need to let users sign up/sign in, recover their password when forgotten, handle payments, background jobs, send emails – the list could go on for ages here.
Thanks to its maturity, Ruby on Rails now has a vast amount of libraries that you can integrate.
For us developers, this means we don’t have to reinvent the wheel for every single project, but instead go with proven, stable, community-developed solutions.
For our clients, it means they don’t have to spend an enormous budget to get the basics in place, and, given that we use the right libraries, the produced code should be resilient to known attacks and scalability issues.
2. Each new version brings features inline with their time
Ruby on Rails has a strict development/release schedule.
Also, since a community of developers maintains it, the framework evolves from their needs.
For example, Turbolinks, a library that allows you only to refresh the content of the page instead of the entire page, was introduced alongside Rails 4.0.
Today it has matured, and offers much more, like partial elements of the page to be refreshed quickly, without code duplication.
This feature came out of the need to produce fast applications, without too much headache.
ActionCable, available in Rails 5.0, allowing quick WebSocket communication from the browser to the server, in real time. It means less page refresh, multiple devices streaming and communication, and real-time notifications in a web application.
Rails 5 also sees the introduction of an API mode allowing developers to create a Ruby on Rails project only used for the back-end part.
This mode makes it extremely useful for mobile app developers that need to store their data, handle authentication and other niceties, into the cloud.
And finally, thanks to the hard work of some famous developers in the community, ** the Rails framework is now faster that ever**.
So faster boot time, faster tests, and faster/happier developers.
3. Better, faster, stronger code
Any Ruby on Rails application will follow the same rules or conventions.
These conventions, adopted by all Ruby on Rails developers, allows us to jump quickly on any codebase, even those written by other peers, and start working pretty much straight away, without having to understand a whole new set of logic or having to reconfigure a lot of elements for the application to work.
It might not be something specific to Ruby on Rails, but for a lot of developers of my generation/background, it was the first time we were encouraged to write tests for our code.
Ruby on Rails quickly made a strong emphasis on writing tests, and it even embeds a testing framework by default.
As a result, this allows us to produce resilient applications, with fewer edge case bugs, or when then happen, makes sure that we are fixing them properly.
Is it still a good idea to use Rails today when I could use [insert any shiny new framework/language]?
Like any good question, the answer is it depends.
Sure, if your project is a test project like we do on our CookiesLab, then experiment with new technologies as much as you can.
When it comes to production applications, potentially supported for 5+ years, then the context is different. You will need to choose the right tool for the job, and a lot more than your personal preference or latest craze in the development industry should be considered.
But, in a lot of web application scenarios, I think Ruby on Rails is still the best framework out there. And looking at Rails 5 just around the corner, I’m sure it will continue to be the best for a few more years to come.