sinaptia waves

Why Ruby on Rails?

Fernando Martínez
Mar 15th, 2023

Ruby on Rails started as a niche framework made with Ruby, considered a niche language at the time. A crazy idea of a guy who believed things could be done differently, better, happier. A few years later, Ruby on Rails was not a niche framework anymore, it became the guiding light for other web frameworks.

Ruby on Rails has set a new standard in web application development: ultra pragmatic, straight to the point, and without complex patterns and configurations, it’s embraced the MVC architectural pattern to create a fast-moving, high-quality, and robust framework that has constantly improved since 2004.

There are big companies, and references in the industry, that choose Ruby on Rails as their base material: GitHub, SoundCloud, Shopify, Basecamp, Airbnb, CouchSurfing, Bloomberg, Dribble, just to name a few.

In its own creator’s words:

[…] that really is what Rails is. It’s all these standard building blocks that most people will need, most of the time.

You’re not starting from scratch. You’re not building a house by first putting clay on top of straws and baking your own bricks in the sun.

Philosophy

The term usually used to describe Ruby on Rails’ philosophy is “convention over configuration”, but I think it doesn’t transmit the idea very well outside of the technical circle around web development frameworks. I would describe Ruby on Rails’ philosophy as cut-the-bullshit, pragmatic, and straightforward. Which is very in line with our values as a company. Ruby on Rails promotes a way of building software based on very simple but powerful concepts, easy to combine and extend.

Solid ecosystem

Ruby and Rails have a lot of mature rubygems around them. Different from other languages, the Ruby community learned to concentrate efforts on a couple of very strong solutions instead of dispersing the effort in a ton of small projects done by a few people. Thus the libraries are long-lived, well-maintained, and stable. You can depend on them and build on top of them, it’s safe.

As Steve Klabnik once said (paraphrasing):

Every time I’ve tried to use a microframework, I’ve ended up with a half-assed Rails.

We did it in the past too, many times, and we’ve learned a lot, but the most important thing we learned is probably:

Spending your money baking bricks when you need a house, is not the best use for that money.

High-quality code

The community embraces testing as a core part of the development process. Most of the tools we have available have a high load of testing included which increases the quality of the code considerably. Maintainers pay attention to code quality metrics, design patterns, and good code practices.

Rails is built in Ruby, which is a mature language itself too. Using a mature language implies that there’s also a mature culture about how code should be written, and a consensus of what is good code and what it is not.

Optimization

Rails is Ruby. Ruby is an elegant, expressive, and easy-to-read language.

Code is written once, and read thousands of times.

Having a language that is expressive and easy to read, that can express complex ideas or whole algorithms in a couple of lines of code, is a massive optimization for 2 reasons:

  1. Your app will always need people working on it, and those people will need to read and understand the code
  2. There will be less code to maintain (nearly 4 times less than Java, 2 times less than JavaScript)

I’m not talking about CPU performance or requests per second here but about development hours and developer experience. In the time spent changing and growing an existing codebase.

Community and support

Ruby on Rails created a big and productive community around itself: around 6K contributors (at the time of writing), huge compared to 2.5K contributors of Django, 700 contributors of Laravel, and 300 contributors of Express.

These numbers help to demonstrate that the whole community’s efforts are very focused on a few widely used tools. Your team and application won’t suffer from unmaintained or abandoned packages easily.

Every year a new version of Ruby on Rails is released with new features, performance improvements, better tooling, and tightened security. The same goes for Ruby.

None of them are dead at all. On the contrary, they are very much alive.