header image

When To Use Rails and React in Your Project

   Back to list

If you’re on the hunt for the best technologies for your web project, the multitude of available options is bound to make your head spin. That’s because you need to choose multiple technologies that will work well together. In the past, to build an application, you’d usually just decide on the main, typically backend technology. Today, you also often have to pick a frontend framework. 

One way to make a choice is by researching the web. The internet is full of opinions, but since people may interpret a given situation differently, they’ll offer opinions based on their ideas and reasoning.

Bearing that in mind, here’s my take on the subject. As you’ve probably guessed by the title of my article, I still consider Ruby on Rails as a relevant technology that offers a lot of value, especially when combined with ReactJS as it’s frontend counterpart. 

Trusted and battle-tested vs. new and exciting

When developing a web application, teams need to balance the thrill of new technologies with business reality. Sometimes there’s a battle going on between developers who want to try brand new and fresh approaches, and business owners and managers who want to get a successful project to market as quickly as possible.

I started out my career as a software developer, and I understand that point of view. That said, being on the other side of the barricade now, I can see the business arguments clearly.

As a consultant, my job is choosing (or helping businesses to choose) a technology stack that won’t become outdated or cause delays due to the lack of community support, missing framework features, limited experience of the team, or problematic recruitment of additional developers who are experienced in the technology.

When choosing between battle-tested and new technologies, consider these things:

  • Typically, solving enterprise issues isn’t a good point of focus when you’re just starting with the project. At that point, there’s no need to plan using a technology that is complex to work with so that you can ensure that your solution can handle thousands of users concurrently. Instead, go to market ASAP and get traction.
  • Also, when building overly complex solutions in the early stages, you risk not making the most of the available resources. Every additional technology generates costs in development and maintenance.
  • You need to ensure a fast development process with tons of support and third-party plugins which your team can easily and quickly integrate with your project. That’s how you can keep the cost of custom development low.
  • Technology, which is easy to host and offers many affordable hosting options is preferable. You don’t want to keep up your DevOps team 24/7 until it becomes absolutely necessary.

Benefits of the Rails & React combo

Now that you know how to approach the problem of choosing battle-tested vs. brand-new technologies for your project, it’s time to take a closer look at our case study: combining
Ruby on Rails with ReactJS.

combining Ruby on Rails with ReactJS

Here are the most important benefits of putting these technologies together:

  • Widespread and well-documented – there are hundreds of web apps running on the RoR & React combo.
  • Rapid development – Rails was designed to accelerate the development process and linking it with React at the frontend layer makes it even faster.
  • Creating automated test is easy.
  • Active community – Rails and React are surrounded by a very active community which shares knowledge and helps developers to get quick fixes for uncovered issues.
  • An ecosystem of tools – both RoR and React offer tons of excellent libraries, plugins, and third-party integrations (for example, authentication with devise and tests with RSpec).

Time to market and solution longevity

When planning a web development project, you have to ask yourself these two questions:

1. How fast can we ship it?

This one is essential. The sooner you put your project in front of testers and clients, the sooner you’ll know its direction. I believe that most projects should be delivered in small, incremental pieces as soon as these are ready. The idea here is splitting the build into the smallest possible items and get them completed in the order of importance for the current user group, then check their reactions and decide about the next steps. Ruby and React are perfect for this; you can iterate fast and deliver often.

2. How long will the current technology stack be sufficient for our needs?

It’s smart to always pay attention to where the project and technology are in relation to the current usage and users’ needs. I believe that it’s best to start with the technology which is most efficient for what needs to happen at the beginning and then decide if any changes are required to satisfy other requirements: growth, additional features, integrations, etc.

For example, Facebook started in PHP. Nobody would pick this language to build a solution that needs to handle billions of requests. But the owner knew it well, so it was easier to build the first version of the social media giant with PHP. If he worried about its future limitations, perhaps the first version of Facebook would never see the light.

Example projects with Rails, React, and both

To learn more about successful startups that started out with Ruby on Rails as their primary tech or are still running on it, check out this article from our blog: 8 Startups That Owe Their Success to Ruby on Rails

If I was asked to choose the most significant example from that list, I think I’d go with Twitter. Twitter was created using RoR and jQuery, and I’d guess that building the initial version of the app (MVP, Proof of Concept) probably took no more than a week or two.

Once the solution gained traction, its technology stack began to evolve to keep up with the growing traffic and the increasing amount of information flying around.

Key takeaway

Ruby on Rails offers an excellent compromise between the exciting features of a modern technology framework and the reasonable cost of development and maintenance. That’s why the combination of Rails and React is so useful – it helps developers to take the best from both worlds and build web applications that satisfy the critical requirements of businesses.

Are you looking for a team of expert RoR and React developers to realize your idea? Get in touch with us; we help companies build web applications within short timeframes and maximum value.

Send this to a friend