Website loading

What is Ruby on Rails & Why you should use it for Web App Development?

Blogpost-featured-image
publisher-image
Corina
Chief Marketing Officer
Aug 4, 2020 • 3 min

Our tech stack, at Wolfpack Digital, for web applications comprises Ruby on Rails and Vue.js, using Heroku, Kubernetes, DigitalOcean, Microsoft Azure, Docker, Amazon Web Services. 

There are plenty of technologies out there that can do the job, but here’s our take on Ruby on Rails! 

What is Ruby on Rails? 

Ruby on Rails (RoR) is a web application framework written in Ruby under the MIT License that helps developers to build web apps and sites through a clean structure to write the code and simplifies common repetitive tasks.

Why should you build a web app with Ruby on Rails? 

We asked a bunch of web developers why they love Ruby on Rails (RoR), checked the official Rails website and read the community's forums, and here are 4 reasons to build your web app with Ruby on Rails👇

  1. Ruby on Rails is developer-friendly.
    The syntax goes as close to English as it can get and it is easy to learn, read, and follow. Additionally, the rails conventions make it easy for developers to move between different Rails projects - so, it is extremely easy to handover the project, especially from the agency side to the client, or from a team to another one within the same company, and to add people to your team without breaking the code on the go.

  2. Enhances fast development and prototyping.
    With Rails, you can focus on your business logic, rather than spending time with configuration and building layer after layer in your architecture. This makes the development process faster no matter how complex your web product will be. 

  3. RoR is a mature framework.
    The framework is proven over time, with a great community and clear convention over configuration. Another advantage of its maturity is that It usually solves issues that other frameworks don’t and offers guidelines and principles that help business - e.g., DRY (don’t repeat yourself) or Time and cost-efficiency.

  4. It has a Business-oriented approach
    Ruby on Rails helps the development team focus on the actual problem the web app is trying to solve and ensures the framework is used as a tool to get the work done in the most efficient way. By having this approach, there is a high chance for Ruby on Rails developers to become agnostic over time and focus on the problem that needs to be solved, rather than a tool to be used. So you can easily scale your business over time, refactor or add new things to the product, without being blocked by the technical side.

Side note: It was really interesting to ask multiple people the same question and get similar answers, even though they worked on different projects across industries, and this only showcases that Ruby on Rails is a handy choice for sure. Thanks to everyone for their opinion: Adrian, Florin, Robert, Sasha, and everyone within the Rails community and across GitHub and Reddit, of course.

Applications using Ruby on Rails

Ruby on Rails is constantly improving!

Just when I was about to hit publish for this article, Florin, our Head of Web Development told us about the latest Rails version, so we decided to add it here as it makes a lot of sense!

Rails 6.1 adds a default value for Active Record enums.

  • Before Rails 6.1, we would define the default value of an enum through migration, as a default value on the database level. Let’s take the following example:

class Article < ApplicationRecord
  enum status: %i[draft pending published]
end

class AddStatusToArticles < ActiveRecord::Migration[6.0]
  def change
    add_column :posts, :status, :integer, default: 0
  end
end


Starting with Rails 6.1, the default values for the enums can be configured directly in the active record models, using the _default option.

class Article < ApplicationRecord
  enum status: %i[draft pending published], _default: :draft
end

There are several advantages to this new approach:

  • We can change the default values easier, without the need to create a new migration.

  • If we remove the current default value from the enum (draft in our example), it will throw an exception. Before Rails 6.1, it continues to set the default values even though that is not an option in the defined enum anymore.

  • Readability. it’s somehow even easier to see the default value when checking the model. Before, you had to check the schema.RB in order to find the default value of an enum.

Now, this may sound a bit technical, but from a business perspective, this will save you a lot of time to check, read, test, and scale the code on the go. So you can grow certain functionalities faster.

 

Long story short, if you want to build a strong web app and you need a top app development company to help you with this, we got your back! Drop us a line in the chat or via the contact form and we will guide you from the product strategy, wireframing, prototyping, development, and Quality Assurance to Launch.

RubyonRails
rails web app

tech insights & news

blog

Stay up to date with the tech solutions we build for startups, scale-ups and companies around the world. Read tech trends and news about what we do besides building apps.