Pros & Cons of Using Ruby on Rails for Web Development
Tags: ruby, showdev, devtips, webdev
Published: 2020-03-02 08:40:58

---
title: Pros & Cons of Using Ruby on Rails for Web Development
published: true
description: What are the main advantages and disadvantages of Ruby on Rails for both developers and businessmen? Find more in our article.
tags: ruby, showdev, devtips, webdev
canonical_url: https://www.codica.com/blog/pros-and-cons-of-ruby-on-rails-for-web-development/
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/x47z1btwy8b314alx4fl.jpg
---

*This article was originally published on [Codica blog](https://www.codica.com/blog/pros-and-cons-of-ruby-on-rails-for-web-development/).*

Nowadays, both startups and established businesses choose Ruby on Rails for web development. Basecamp, GitHub, Dribble, Airbnb are well-known brands that have built their websites with this framework.

So what makes Rails a good choice?

At Codica, we are big fans of the tool and want to share its main benefits and drawbacks.

## Insights into Ruby on Rails

### Interesting statistics

First, let’s see what figures can tell us about the Ruby on Rails framework:

* According to BuiltWith, over [523,339 live websites](https://trends.builtwith.com/framework/Ruby-on-Rails) are created with the technology.
* There are almost [4,000 coders](https://github.com/rails/rails) who contribute to the progress of RoR on GitHub.
* Ruby on Rails has over [45,000 GitHub stars](https://github.com/rails/rails).
* Arc states that the average hourly rate of a Senior Ruby on Rails developer in North America is [$121-140](https://www.codementor.io/freelance-rates/ruby-on-rails-developers).

### A short history of Rails

David Heinemeier Hansson created Ruby on Rails in the early 2000s while working on a project management tool called [Basecamp](https://basecamp.com/). 

The RoR framework is noted for its fast speed and ease of the web application development and deployment by many technical experts. Thus, Yukihiro Matsumoto, the creator of Ruby programming language, calls this tool “the killer app for Ruby”.

Over recent years, Ruby on Rails has been greatly improved with new functionality that strengthened its positions.

### Fundamental principles of Rails

Ruby on Rails is an open-source framework widely used in web app development. It runs on Ruby and focuses on simplicity and refined output.

Its core principles allow entrepreneurs to spend less money. At the same time, developers can complete tasks faster and more effortlessly.

**Principle: [Don’t Repeat Yourself](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself) (DRY)**

This rule states that every code snippet requires a single, unambiguous, and authoritative submission within a system. It makes an app code cleaner with fewer bugs. Besides, developers restructure the code or [refactor](https://en.wikipedia.org/wiki/Code_refactoring) it hands-down.

**Principle: [Convention Over Configuration](https://en.wikipedia.org/wiki/Convention_over_configuration)**

This concept supposes that systems, libraries, languages you work with assume lots of logical situations by default. Bearing this fact in mind, coders adapt to them and specify some unconventional aspects of a web app rather than create new rules each time. Thus, programming is getting easier and more productive.

## Pros and cons of using Ruby on Rails

When it comes to web application development, there is a great variety of tools to choose from. You should consider such factors as a learning curve, scalability, hosting requirements, ease of installation, documentation to make the right decision.

Below you can see the most significant benefits and drawbacks of Ruby on Rails.

### Advantages of Ruby on Rails

**1. Simplicity in use**

RoR is famous for intuitive, compact, and easy-to-understand syntax which means the highest usability to programmers.

Ruby on Rails developers write less code. As a result, the process of creating a web application becomes faster. Owing to framework readability, there are no grounds to add comments. Consequently, the code is getting more understandable for developers.

Besides, as projects stick to the identical rules and philosophy, programmers can shift from one Rails project to another at any development stage.

**2. Security**

In recent years, cybersecurity issues have become a serious problem for both developers and businesses. According to [Cybint Solutions](https://www.cybintsolutions.com/cyber-security-facts-stats/), shocking 64% of companies have faced web-based attacks. Meanwhile, 62% of companies became victims of phishing & social engineering attacks.
 
The chart below shows that the latter type of cybersecurity issues [mostly aim at SaaS, financial institutions, and e-commerce platforms](https://www.statista.com/statistics/266161/websites-most-affected-by-phishing/).

![](https://dev-to-uploads.s3.amazonaws.com/i/fyuh1nl1n3p1k8uikbds.jpg)

These alarming statistics explain why the security of your future solution is paramount.

Luckily, thanks to its built-in mechanisms, Ruby on Rails guarantees the resistance of your web page or app to common vulnerabilities. With this framework, your web product will be protected from the following threats:

* Cross-Site Scripting
* SQL Injection
* Cross-Site Request Forgery
* Insecure Direct Object Reference or Forceful Browsing.

**3. High development speed**

The framework offers a great number of [free open-source libraries called gems](https://www.codica.com/blog/top-ruby-gems-we-cant-live-without/). They extend or modify the existing functionality of web apps and provide developers with solutions to common issues. Whatever functionality you want to implement- odds are that [you will find a gem for it](https://rubygems.org/). 

Today, [the quantity of Ruby gems has exceeded 158 700+](https://rubygems.org/stats) with over 48 billion downloads.

Also, there are library extensions and utility classes provided by a framework component called [Active Support](https://guides.rubyonrails.org/active_support_core_extensions.html) which is responsible for developing both Rails applications and the technology itself.

**4. Enthusiastic community**

Ruby on Rails has a vibrant community. Its active members create Ruby on Rails dedicated websites, forums, and chat rooms and provide developers with professional answers from coders who have experienced a similar problem and came up with a solution.

In addition, the participants are constantly creating guides, manuals, lessons, and [other educational materials](https://rails-weekly.ongoodbits.com/).

Finally, the community hosts [RailsConf](https://railsconf.com/) which is the largest gathering of RoR developers where they can share their experience with other fans of this framework.

**5. Easy business logic implementation**

Implementation of complex business logic in a web application is easy with Ruby on Rails. Suppose, you need API. Developers applying this framework will create it really fast. The only thing you should do is to add a front-end framework like Vue or React, and that’s it. You will get a ready web app.

**6. Compatibility with front-end frameworks**

Today such front-end frameworks as React, Vue, and Angular are increasingly popular. These tools are widely used together with Ruby on Rails due to the easy integration of RoR. You can take any framework you like and develop front-end components quickly and effortlessly.

### Disadvantages of Ruby on Rails

**1. Runtime speed and performance**

Pretty often an application’s success depends on these two parameters. The great amount of apps available makes users more demanding. They don’t want to wait. Customers expect web applications to load quickly and seamlessly.

[Google study shows](https://think.storage.googleapis.com/docs/mobile-page-speed-new-industry-benchmarks.pdf) how each second delay decreases the number of page views.

![](https://dev-to-uploads.s3.amazonaws.com/i/ic4bpkg2v55943nyc9z3.jpg)

Runtime speed of Ruby on Rails leaves much to be desired. While it will be enough for small apps without millions of users, it may become an issue when building a solid web project.

However, the [Ruby on Rails 6.0](https://rubygems.org/gems/rails/versions/6.0.0) version released in August 2019 touched upon this subject. Support for multiple simultaneous database connections is a new important feature. It can boost performance by allowing developers to use two databases to switch between them.

**2. Lack of flexibility**

With a hard dependency between components and modules, Ruby on Rails is a perfect solution for a regular web app. However, when it comes to an app with specific functionality, customization can be challenging.

Configuring routing, database migrations, and other elements slow down the web app development process.

**3. Lower popularity**

During the last couple of years, we have been witnessing a decline of Ruby on Rails popularity. The statistics provided by [Google Trends](https://trends.google.com/trends/explore?date=all&q=%2Fm%2F0505cl) shows a lack of interest in this framework.

![](https://dev-to-uploads.s3.amazonaws.com/i/9z7v0c2cpdtznvcroiky.jpg)

Despite the increasing number of developers and the supportive community, the technology is not as widely used as, for example, Laravel for PHP, or Django for Python. One of the possible reasons is its steep learning curve. Developers who master Ruby on Rails, as a rule, know one or two programming languages.

For business owners, it means that hiring an [experienced Ruby on Rails development agency](https://www.codica.com/company/) may become rather a challenging process, if compared to finding a PHP, Java, or Python web company. At the same time, they get more experienced and skillful specialists.

## Usage of Ruby on Rails in web development

![](https://dev-to-uploads.s3.amazonaws.com/i/30irafn85qyejunku3y2.jpg)

Let’s take a closer look at the projects that are best suited for Ruby on Rails framework.

**Startups**

Ruby on Rails is one of the most suitable technologies used by startups. It is applied when building prototypes and for development, that makes Rails highly prized.

Such popular platforms as GitHub, Twitter, Airbnb, and Dribbble were primarily created with Ruby on Rails.

**E-commerce**

With the previously mentioned gems, you can implement basically any feature an e-commerce platform may need: from a payment gateway to a help desk. Your online marketplace will be up and running in no time.

Besides, you need to protect payment data and personal information of both buyers and sellers to build trust in the platform. At the end of the day, your ability to secure sensitive information of your clients can significantly boost customer experience. That’s when Ruby on Rails becomes the right choice.

Shopify, Fiverr, Groupon, and Etsy were originally based on Ruby on Rails.

**SaaS**

When building SaaS products, security becomes the top priority. Ruby on Rail ensures the safety of your web product. There are lots of precautions to protect the data within this framework including usage of numerous gems for authentication and increasing password length, multiple built-in encryption libraries, skipping forgery requests, and strong parameters usage.

Basecamp, Zendesk, and GitHub are amongst the most well-known SaaS apps built with RoR.

## Final words

To summarize, Ruby on Rails is an efficient, scalable, and secure web development framework which can help you build any kind of products: from e-commerce platforms to SaaS solutions.
However, RoR has some drawbacks as well that should be taken into account.

*If you want to learn more about the subject, check our full article [Pros & Cons of Using Ruby on Rails for Web Development](https://www.codica.com/blog/pros-and-cons-of-ruby-on-rails-for-web-development/).*