What Exactly is Ruby on Rails and How Did It Come About?

What Exactly is Ruby on Rails and How Did It Come About?
Page content

A Brief Introduction to Ruby

Initially enjoying popularity only in Japan, the Ruby programming language gained prominence worldwide relatively recently. It started as an open source, object-oriented language, created by Yukihiro Matsumoto because he found some of the other languages inadequate for his programming purposes.

The library of commands was then circulated amongst a mailing list, slowly gaining recognition as programmers assimilated its benefits over other languages. It was heavily inspired by older programming languages like Perl and Smalltalk, among others.

Ruby was intended to be a scripting language, and evolved as such; however it could also be used as a fully-fledged programming language in its own right.

Ruby on Rails: In Short

Ruby on Rails is an open source web application framework, which is built using Ruby as a base. It is designed to support Agile development, a methodology used for rapid application development.

A web application framework is a development environment, where websites, web applications or web services are created easily. As these applications usually are created from scratch, the initial testing stages tend to be complicated to perform without an application framework. Once the application is completely finished, it is then released from the framework altogether, and run on its own. This method of development allows a programmer to focus on the problem at hand, rather than the individual technical details.

Why use Ruby on Rails?

Since Ruby on Rails is intended to be used for rapid development, it naturally follows that the framework facilitates productivity and high output.

Usually quick programming ideologies lead to terrible code, messy and difficult to maintain. However, with Ruby on Rails, this is not the case at all – the principles on which Ruby on Rails is formulated, leads the code to become not only clean, but actually leaner than before.

Another contention normally associated with rapid development is that the framework can only be used for the simplest of applications. Again, Ruby on Rails breaks through the stereotype here, as the programming practices are immensely scalable.

A significant amount of credit for these benefits goes to the base programming language, Ruby. As it is leaner by nature, this characteristic has percolated to Ruby on Rails as well.

Convention over Configuration

One of the more cumbersome aspects of programming is the heavy, yet necessary, use of configuration files. These are files that specify exactly how the parts of the code correspond to each other. For example, most applications use some form of data storage, therefore it is necessary to map variables and classes to their database counterparts explicitly.

With Ruby on Rails, this is not necessary at all. Tables in the database are given names that exactly mirror their class counterparts. The same convention is applied to variables and attributes, making the exchange between the two entirely intuitive. A developer only explicitly codes a relationship if it does not conform to this rule, like when a class and a table have differing names.

Where to get Ruby on Rails?

Ruby on Rails is available for download from the official site, https://rubyonrails.org/. Ruby on Rails can be easily installed using a package management system like RubyGems, or one that is already built into a Linux distribution.

It is compatible with almost all databases, and even if it does not already have the requisite support – that can be rectified without too much difficulty.