What is Ruby on Rails & what is it used for?

Ruby on Rails is a full-stack framework packed full of features. The official documentation calls it a “metropolis filled with all the institutions needed to run a large, sprawling application like Basecamp or GitHub or Shopify”. Like all frameworks, it is designed to make programming web applications easier by making assumptions about what every developer needs to get started. 

What is Rails?

Rails is another name for Ruby on Rails, and it was once an extremely popular framework used frequently across the web. However, while it may not be as popular as it once was, it is still in use by many websites. 

What is Ruby on Rails used for? 

It is a server-side framework that provides a structure for web pages, databases and more. In short, it allows you to write less code for getting your projects and applications finished. 

Ruby v Ruby on Rails

Ruby and Ruby on Rails are connected, but they are definitely not the same thing. Ruby is a high-level, general-purpose programming language, whereas Ruby on Rails is an open-source framework.  

  • Ruby
    As a programming language, Ruby is used both on the front end and the back end of software development.  Ruby supports various platforms like Windows, Linux, Mac and more. Like Python, it is a dynamic language that is similar to the English language, and like Python, it is used for the fast and efficient building of web applications. 
  • Ruby on Rails
    Ruby on Rails is related to Ruby in that it was initially programmed using Ruby. It is a Model View Controller (MVC) framework – which means it follows an MVC pattern as well as some other patterns like DRY (Don’t Repeat Yourself). 

What is an MVC pattern?

In software development, a pattern (or design pattern) is a written document that describes a general solution to a design problem that recurs repeatedly in many projects. Software designers adapt the pattern solution to their specific projects. MVC is an architectural programming paradigm that has been around since 1979 and it is used by many web frameworks. 

MVC offers a way of thinking and processing information and is used to help structure your applications. MVC is a pattern, not a framework, but it’s MVC that makes frameworks so popular. 

RubyGems

The Python community has contributed hundreds of powerful third-party libraries that developers can use for free in their projects.  It’s getting to the point now that if you discover that some pre-built stuff would really help fast track your development, the chances are that someone has built it already and made it freely available. The same goes for Ruby on Rails.  The Rails community has developed many libraries –  called RubyGems or just gems – to help you build world-class web applications.

Like Django and its core libraries, some of the gems are required by every Ruby on Rails application. For example, database adaptors enable Rails to connect to databases. Other gems are used to make development easier, for example, gems for testing that help programmers find bugs. Still, other gems add functionality to the website, such as gems for logging in users or processing credit cards. 

Knowing what libraries to use, and why, is an essential aspect of learning any Framework. 

Examples of where Ruby on Rails is used

While Ruby on Rails is not as popular as it once was, it is or was used in the development of many well-known websites and applications. Among them are: 

  • Twitter
    Ruby on Rails was used in the initial development of Twitter for its launch in 2004. Later on, Twitter switched to another framework
  • Airbnb
    Airbnb uses Rails as part of its service. Like with many other sites, it also uses other frameworks. 
  • GitHub
    Rails was used in the building of GitHub, and it’s still used as part of their system. 
  • Shopify
    Shopify uses Ruby onRails in the development of its website. 

The benefits of Ruby on Rails

Along with some cons, there are quite a few pros with Ruby on Rails. 

Pros 

  • Tools
    Ruby on Rails provides fantastic tooling that helps you to deliver more features in less time. It provides a standard structure for web apps, where all the common patterns are taken care of for you.
  • Libraries
    There’s a gem for just about anything you can think of. They are all publicly available and searchable through.
  • Automated testing – The Ruby community is big into testing and test automation.

Cons

  • Performance
    Many developers reckon that Rails is slower than some of the alternatives. Some assume that its speed is slower purely because of how old the framework is. 
  • Cost
    Hosting a website or app using Ruby on Rails can be expensive.

Learn some coding basics for free

Software development is full of exciting technologies, frameworks and languages, and like Ruby on Rails, after you train as a developer, this could be something you’ll want to learn. If you want to learn some of the basics of software development, like HTML, CSS and JavaScript for free, try our free 5 Day Coding Challenge. After one hour a day, over five days, you’ll have built your first web page. Register now through the form below.

Relational Databases

Databases, in combination with a Database Management System (DBMS), allow persistent storage, easy administration, and safe manipulation of information and are therefore among the most important computer applications. Data in a database is structured according to one of the multiple sets of rules. Proposed in 1970 by E.F. Codd, the relational data model is the […]

Best Way To Make Time To Study

Learning is a continuous process. Learning something new is never too late or too early, and when it comes to programming, the process of learning is simply endless. Every now and then, something new emerges in the tech sector, and to be the perfect programmer, you must be well-versed in the most recent concepts and […]

Python Cheat Sheet

Python is one of the most popular programming languages. It currently takes first place both in the Tiobe index and the PYPL index and has been named Language of the Year in 2007, 2010, 2018, 2020, and 2021. This popularity stems both from Python’s versatility and ease of use. Python can be used for Web […]