Web frameworks – Introduction to Ruby on Rails


Ruby on Rails, also called RoR or Rails is a free web framework written in Ruby. It follows the design pattern Model View Controller also called MVC. As a framework, it provides a structure which allows the programmer to develop faster and more intuitively.

It also adds a high level of abstraction in programming the application of a set of high-level functions that it offers and the economy of writing itself is most required in web application routines.


Rails is based on two fundamental principles:

Do not repeat yourself

Try as much as possible to have elements of the application in one place . The MVC architecture and metaprogramming in Ruby can facilitate this.

Convention over configuration

not specify the configuration items if they do not meet the established conventions. Rails exploits this by providing default behavior for most of its functionality. This vision will be retained even after the merger with Merb and future modularization framework.

Starting a Rails project, regardless of whether configuration items are present. It usually contains the username and password for access to the database, eg MySQL. However, you can start a project without setting the default use of SQLite.

The configuration files are YAML.


The first version of Ruby on Rails was announced on July 2004. The framework was extracted from Basecamp2, a project management tool developed by David Heinemeier Hansson.

The first stable version (1.0) was released on 14 December 2005.

From that date, Ruby on Rails has marked the world of web development. We have seen a growing set of Rails -like Web Framework (Including CakePHP, Symfony and CodeIgniter just for PHP).

A preview release of version 2.0 was announced on September 30, 2007. Rails 2.0 brings the following:

Resources that provide a REST architecture;
a clearer differentiation between formats and converters (rhtml file becomes a file html.erb, and the result is the HTML file).
the possibility of using models such as URL (eg redirect_to (person) ) ;
management of basic HTTP authentication;
protection against CSRF attacks;
interception simplest generic exceptions;
cache the result of some SQL queries;
simplification of writing migration;
moving in all act_as_ plugins and modules * proprietary database;
early abandonment of SOAP in favor of REST ;
a new system that replaces the debug breakpoints.

Rails 2.3 brings the use of middleware Rack: for managing queries on the server level, and incorporates a reverse proxy. Another important change is the management of nested form objects.

Rails 3 is the confluence between Rails and Merb4. Following a complete rewrite, agnostic (General API is disconnected from a particular library). Version 3.0 was released on August 29th 2010.

Version 4 was released June 25, 2013 and advises the use of Ruby 26.

About these ads