Rails is the most well thought-out web development framework I’ve ever used.
James Duncan Davidson, Creator of Tomcat and Ant.
Ruby on Rails, frequently referred to as just Rails or RoR, is a popular open-source framework. While it’s not the youngest kid on the block (it turned 16 in 2020), it’s still among the top choices for web application developers.
Eric Ries, founder of Lean Startup Movement
Rails has done more for startups than a whole boatload of Venture Capitalists. Rails has had an incredible impact on the startup ecosystem.
It is frequently ranked as one of the top backend frameworks for the web. It’s used by some of the world’s biggest brands, such as Airbnb and Spotify. With good reason, RoR has also been built into macOS for many years. And there’s a vibrant, ever-growing community around Rails. Thousands of user-built gems make the development a breeze.
Like it or not, Ruby on Rails is here to stay. But what is it really about? Is it the right choice in 2020, whether you want to quickly ship an MVP, build a full-fledged site, or migrate? Is it a good time to become an RoR developer? That’s what we’re here to discuss.
What is Ruby on Rails?
Ruby on Rails is a framework built on top of Ruby — a programming language created in the 90s. The idea behind RoR is straightforward — to give developers an intuitive framework to quickly develop robust, high-performing web pages.
Ruby’s original heresy was indeed to place the happiness of the programmer on a pedestal.
David Heinemeir Hanson, creator of RoR
Rails delivered on the promise. It gives you the structure to build nearly any web application. It simplifies the creation process and gives you an abundance of tools to handle tasks for you. And all of these contribute to what RoR creator, David Heinemeier Hansson, frequently emphasized—engineers’ happiness.
“Ruby’s original heresy was indeed to place the happiness of the programmer on a pedestal. Above many other competing and valid concerns that had driven programming languages and ecosystems before it.”
And this wasn’t just a marketing slogan. From the beginning, Ruby on Rails has been heavily focused on giving developers a clean, fun-to-use framework that is powerful and truly different from anything else. The community that grew around it and the abundance of resources they created only helped bolster the growth of RoR.
As Hansson put it in the Rails Doctrine:
“Where Python might boast that there’s ‘one, and preferably only one, way to do something,’ Ruby relished expressiveness and subtlety. Where Java championed forcefully protecting programmers from themselves, Ruby included a set of sharp knives in the welcome kit. Where Smalltalk drilled a purity of message passing, Ruby accumulated keywords and constructs with an almost gluttonous appetite.”
The entire piece gives a much deeper insight into the underlying concept of Rails. We highly recommend giving it a read.
Principles of RoR
Ruby on Rails is known as an MVC (model-view-controller) full-stack framework. The code is separated into three interconnected layers:
To give you an example, let’s assume we’re building an app – an atlas of rare birds. The model is responsible for defining, for instance, how bird categories are defined and what data each listing contains. The view specifies how each screen of the app is rendered to users and what happens after each UI interaction. Finally, the controller receives each user’s input (for example, a search query), requests the needed data from the model, and tells the view how to display it.
Ruby on Rails centers around two main principles, also known from other programming frameworks.
This first principle states: “Every piece of knowledge or logic must have a single, unambiguous representation within a system.” The logic behind it is straightforward. Coding the same things repeatedly, in different parts of an application, clutters the codebase, slows down development, and makes maintenance a lot harder.
When developing in RoR, you split the application’s logic into smaller, reusable units. You then reuse them throughout the code by simply calling them. When you need to update either piece, you update once, and the change applies across the entire codebase.
This second principle is also about simplifying development and cutting down on time needed to ship the code. Convention over Configuration means that the RoR assumes various logical situations for you, by using the underlying, native functions, classes, variables and procedures.
In this way, it decreases the number of decisions you make, and cuts down on the complexity usually associated with configuring each application area. And if you’re unhappy with the default settings, you can overwrite them with your code and adjust the environment to your needs.
One self-evident example of a convention used in Rails is naming. Models we mentioned earlier are always named with a singular proper noun describing the object they represent: ‘user’, ‘portfolio,’ ‘project’. By default, Rails will name the corresponding tables with the plural versions of the modals and, to continue the example, a ‘users’ table will be created.
It might not seem like a significant simplification, but if you were to name hundreds of tables with meaningful words manually, you would right away appreciate the convenience.
History of Ruby on Rails
David Heinemeir Hanson released RoR in July 2004. He extracted it from his work on the project management app, 37Signals (today known as Basecamp), and has been developing it ever since – at first by himself, and now with a dedicated core team.
Rails wasn’t just an enhanced version of Ruby. It was nothing short of a revolution in the programming world. As Tim O’Reilly of O’Reilly Media publishing house put it at the time:
“Ruby on Rails is a breakthrough in lowering the barriers of entry to programming. Powerful web applications that formerly might have taken weeks or months to develop can be produced in a matter of days.”
Eric Ries, the man behind the famous Lean Startup movement and book, spoke in a similar tone in one of his keynotes:
“Rails has done more for startups than a whole boatload of Venture Capitalists. Rails has had an incredible impact on the startup ecosystem.”
And RoR became nothing short of a significant success nearly overnight. In 2007, the newly-released Mac OS X v.10.5 (aka Leopard), shipped with RoR built-in. This led to a surge in popularity in developer communities worldwide and loads of applications shipped with Rails underneath. Each year would bring a new release, enhancing the possibilities and making the language more accessible to newcomers. At the time of writing, Ruby on Rails 6.0 and, as the release log would testify, the team shows no sign of slowing down.
But first, there was Ruby…
Before Rails took the market by storm, there was a Japanese guy named Yukihiro Matsumoto (or “Matz”). He created Ruby in 1993 and two years later released it to the world. He was fascinated with object-oriented languages, but none that existed at the time appealed to him. So he decided to do something about it. Here’s his quote from a post he made back in 1999:
“As a language maniac and OO fan for 15 years, I really wanted a genuine object-oriented, easy-to-use scripting language. I looked for but couldn’t find one. So I decided to make it.”
25 years later, Matz and his team still actively develop Ruby. Aside from being the code of RoR, Ruby is also a standalone language used to build web applications. Its next major release, v. 3.0, is set for the 2020 Christmas season.
Rails is the killer app for Ruby.
Yukihiro Matsumoto, Creator of Ruby
Popular applications built with Rails
Ruby on Rails has been a go-to language for many years. As a result, many sites have been developed with Rails under the hood, and developers have gone in many different directions with the language.
Of course, everything started with 37Signals / Basecamp, and unsurprisingly, their site has been powered by Rails ever since. As the hype progressed, many famous brands joined the party: GitHub, Airbnb, Zendesk, Groupon, Shopify, Hulu, Kickstarter, and others. Twitter also ran on RoR in the early days but has rebuilt its platform ever since.
For us at Railsware, RoR has been the go-to solution for many years. We’ve developed dozens of successful Rails projects. Here are several examples:
Calendly is a popular meeting scheduling app. The platform generates an individual link for your invitees to use to quickly schedule a meeting. The app integrates with your calendar and popular apps, such as Salesforce, PayPal, or Google Analytics.
BrightBytes is a data analytics platform for the education sector. It gathers insights from the world’s best experts and transforms it into evidence-based, actionable frameworks to improve education and boost students’ well-being.
Mailtrap is our own product—we took it from a small prototype to one of the world’s most popular email testing tools, with over 600,000 registered users. Mailtrap lets its users set up a safe testing environment and capture all outgoing emails. Then, users can inspect and improve them without any risk of spamming real users.
For more, check out our list of Ruby on Rails websites.
Is Ruby on Rails the right choice for businesses in 2021?
It’s not uncommon to hear that Ruby is dead or nearing its extinction. It’s certainly no longer the most popular framework. It’s also not as sexy as it was back in the day. And yet, millions of developers still use it, and most are likely not going anywhere else.
The most commonly used programming languages, as a percentage of those that took the Stack Overflow survey.
Why is that? Ruby on Rails has many distinct advantages that, in 2020, still make it a viable option for businesses—but it won’t be perfect for all of them. But 16 years after its inception, we still use it for nearly every project, and over 1.5 million live sites are run with RoR under the hood.
There are several reasons for this. For example:
To give better advice on whether RoR is the right choice, let’s consider two scenarios:
Is RoR the right choice for new projects?
The reason Rails became so popular, especially among startups, is its speed of development. When building a so-called Minimum Viable Product (MVP), the time-to-market is of the utmost importance. You want to quickly ship a product, onboard the first users, and start iterating.
Ruby on Rails was built with all of these needs in mind, and is arguably the top choice for startups launching their products. It’s quick to develop a prototype with Rails – many are ready to take on their first users in just a few weeks. RoR makes this possible because of the abundance of gems (160k+ at the time of writing!) and the intuitive nature of a framework.
Once you’ve confirmed your assumptions or found a different, viable business model, there’s no need to switch to another framework. Ruby on Rails is perfectly suitable for large projects with complex backends, thousands of users, and a wide array of functionalities.
As such, Ruby is among the best options if you:
Should you migrate from RoR?
If you already have a product built on Ruby, you may be tempted to consider a switch to another, hotter framework. Ruby has several limitations that may give valid reasons for a move:
With this in mind, let’s straighten up some common misconceptions about RoR.
Is Rails slow?
Rails isn’t slow by any definition. It can’t match some JS frameworks or Golang, but it is absolutely in line with many other popular frameworks’ performance. The speed can only be an issue with huge implementations that drive massive traffic. Even then, this can be often addressed with the right architecture and database structure.
Does RoR’s age make it boring?
Rails is also referred to as a boring framework because of its age and waning hype (which was once RoR’s trademark). But is that necessarily a bad thing? Maturity makes RoR stable and predictable. Hype comes and goes. RoR is here to stay.
Having said that, if you’re struggling to scale your Ruby on Rails app, give us a shout. We’ll gladly jump on a call and advise, with full transparency, if RoR is still the way to go.
If neither of the above points is a deal-breaker, then Rails will arguably serve you well for many years to come. The number of resources keeps growing, and the community is among the best and most active in the industry. The framework is actively developed and keeps getting better. And finding experienced developers or reputable agencies is as easy as it’s ever been.
What are the typical Ruby on Rails implementations?
As we said earlier, RoR isn’t perfect for all projects but handles many of them well. Here are the usual implementations:
MVPs and early-stage products are the typical implementations, for many of the aforementioned reasons. But there’s a lot more that you can build with Ruby on Rails.
Should you learn Ruby on Rails in 2021?
Ruby on Rails is a breakthrough in lowering the barriers of entry to programming
Tim O’Reilly, Founder of O’Reilly Media
It can be tough to make up your mind about the next framework to learn with so many available options. Depending on your interests, RoR may be one of the best on the list. Why? Let’s see.
When not to choose RoR?
If Rails appealed to you with its MVC architecture but something else didn’t quite match, ReactJS could be a viable alternative. It’s trendy, quickly growing, and is undoubtedly in demand. The same can be said about Laravel, which has grown a fantastic community around it and provides tons of resources for those just getting started.
If you always want to be on top of the latest technology trends, you can’t overlook Python and its most popular framework, Django. It offers a rich ecosystem and an abundance of features that simplify development. Many of them came from Rails and enhanced it, quickly becoming some of the all-time favorites.
Among other popular options, Java-based Spring and a JS family of Angular, Vue.js, and Express should certainly not be overlooked.
Ruby on Rails framework compared to popular alternatives
If you’re interested in a further comparison of these popular frameworks, be sure to check our articles:
Ruby on Rails resources
Tutorials & Documentation:
Upcoming Ruby and Ruby on Rails conferences
Due to the current global situation, many events have been canceled or postponed until next year. If you’re craving some Ruby gatherings online, there are a few opportunities coming up:
We’ll update the list as the situation progresses, so make sure you check back in some time.
Here are the key concepts used throughout this page, in alphabetical order: