Pros & Cons of Using Ruby on Rails for Web Development

Codica Team
Codica Journal
Published in
8 min readMar 2, 2020

This article was originally published on Codica blog.

Today both startups and established businesses choose Ruby on Rails for web development. Basecamp, GitHub, Dribble, Airbnb — this is an incomplete list of companies that have built their websites with this framework.

So what makes RoR such a good choice?

Being huge fans of Ruby on Rails, we have prepared an article covering the key benefits and downsides of this tool.

Insights into Ruby on Rails

Interesting stats

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

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.

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, creator of the 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 fewer costs. At the same time, developers can complete tasks faster and more effortlessly.

Principle: Don’t 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 it hands-down.

Principle: 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 need to 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 for web development

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. Security

In recent years, cybersecurity issues have become a serious problem for businesses. According to Cybint Solutions, 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.

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.

2. 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.

3. High development speed

The framework offers a great number of free open-source libraries called gems. 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.

Today, the quantity of Ruby gems has exceeded 158 700+ with over 48 billion downloads.

Also, there are library extensions and utility classes, that make up Active Support that is responsible for developing both Rails applications and the technology itself.

The high development speed is one of the key reasons why startup owners choose Ruby on Rails. This framework speeds up the MVP development process and allows creating a high-quality web product even on a budget.

4. Enthusiastic community

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

In addition, the community members are constantly creating guides, manuals, lessons, and other educational materials.

Finally, the community hosts RailsConf 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.

This Google study shows how each second delay decreases the number of page views.

Sometimes, the runtime speed of Ruby on Rails leaves much to be desired. While it is 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 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. This factor forces business owners to choose between the unique design of an application

3. Lower popularity

During the last couple of years, the popularity of Ruby on Rails has been on decline. The statistics provided by Google Trends shows a lack of interest in this framework.

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 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

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 MVP 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 a top priority, and Ruby on Rails 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.

Resume

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.

For more information about the benefits and drawbacks of this framework, check our full article Pros & Cons of Using Ruby on Rails for Web Development.

This article was originally published on Codica blog.

--

--

Codica Team
Codica Journal

Software development consultancy. We are passionate about innovations and create great online marketplaces with Ruby on Rails, React, Vue and Angular.