Home > Web Hosting Glossary > Ruby on Rails

Ruby on Rails

November 30th, 2009 admin


Ruby on Rails, often shortened to Rails or RoR, is an open source web application framework for the Ruby programming language. It is intended to be used with an Agile development methodology that is used by web developers for rapid development.

Ruby on Rails was extracted by David Heinemeier Hansson from his work on Basecamp, a project management tool by 37signals (now a web application company). Heinemeier Hansson first released Rails as open source in July 2004, but did not share commit rights to the project until February 2005. In August 2006 the framework reached a milestone when Apple announced that it would ship Ruby on Rails with Mac OS X v10.5 “Leopard”, which was released in October 2007.

Technical overview

Like many contemporary web frameworks, Rails uses the Model-View-Controller (MVC) architecture pattern to organize application programming.

Ruby on Rails features several tools intended to make commonplace development tasks easier “out of the box”. Rails provides scaffolding that can automatically construct some of the models and views needed for a basic website. A simple ruby web server (WEBrick) and Rake build system are also included. By including these common tools with the Rails framework, a basic development environment is in effect provided with all versions of the software.
Ruby on Rails relies on a web server to run it. Mongrel is generally preferred over WEBrick at the time of writing but it can also be run by Lighttpd, Abyss, Apache (either as a module – Passenger for example – or via CGI, FastCGI or mod_ruby), and many others. From 2008 onwards, the Passenger web server replaced Mongrel as the most used web server.

Rails is also noteworthy for its extensive use of JavaScript libraries Prototype and Script.aculo.us for Ajax.[7] Rails initially utilized lightweight SOAP for web services; this was later replaced by RESTful web service.

Since version 2.0, Ruby on Rails by default offers both HTML and XML as output formats. The latter is the facility for RESTful web services.

Framework structure

Ruby on Rails is separated into various packages, namely ActiveRecord (an object-relational mapping system for database access), ActiveResource (provides web services), ActionPack, ActiveSupport and ActionMailer. Prior to version 2.0, Rails also included the Action Web Service package that is now replaced by Active Resource. Apart from standard packages, developers can make plugins to extend existing packages.

Philosophy and design

Ruby on Rails is intended to emphasize Convention over Configuration (CoC), and the rapid development principle of Don’t Repeat Yourself (DRY).

“Convention over Configuration” means a developer only needs to specify unconventional aspects of the application. For example, if there is a class Sale in the model, the corresponding table in the database is called sales by default. It is only if one deviates from this convention, such as calling the table “products sold”, that the developer needs to write code regarding these names. Generally, this leads to less code and less repetition.

“Don’t repeat yourself” means that information is located in a single, unambiguous place. For example, using the ActiveRecord module of Rails, the developer does not need to specify database column names in class definitions. Instead, Ruby on Rails can retrieve this information from the database based on the class name.

Recent developments

Rails version 2.3 was released on March 15, 2009. Major new developments in Rails includes templates, engines, Rack and nested model forms. Templates enable the developer to generate a skeleton application with custom gems and configurations. Engines let one reuse application pieces complete with routes, view paths and models.

The Rack web server interface and Metal allow one to write optimized pieces of code that route around ActionController. On December 23, 2008, Merb, another web application framework, and Rails announced a commitment to work together. The Rails team announced they would work with the Merb project to bring “the best ideas of Merb” into Rails 3, ending the “unnecessary duplication” across both communities.

Trademarks

In March 2007 David Heinemeier Hansson filed three Rails related trademark applications to the USPTO. These applications regard the phrase “RUBY ON RAILS”, the word “RAILS” and the official Rails logo. As a consequence, in the summer of 2007 Hansson denied to Apress the permission to use the Rails logo on the cover of a new Rails book written by some authoritative community members. The episode gave rise to a polite protest in the Rails community. In response to this criticism, Hansson made the following claims:

“I only grant promotional use [of the Rails logo] for products I’m directly involved with. Such as books that I’ve been part of the development process for or conferences where I have a say in the execution. I would most definitely seek to enforce all the trademarks of Rails.”

Criticism

Rails has been criticized for issues with scalability. These critics often mentioned various Twitter outages in 2007 and 2008, which prompted Twitter’s transition to Scala (which runs on the Java Virtual Machine) for their queuing system, although the majority of the site continues to run on Ruby.

Post to Twitter Tweet This Post Post to Plurk Plurk This Post Post to Yahoo Buzz Buzz This Post Post to Delicious Delicious Post to Digg Digg This Post Post to Facebook Facebook Post to MySpace MySpace Post to Ping.fm Ping This Post Post to Reddit Reddit Post to StumbleUpon Stumble This Post

0 positive user reviews     0 negative user reviews.

Related posts:

  1. TCP/IP The TCP/IP model is a description framework for computer...
  2. ColdFusion ColdFusion is a commercial rapid application development platform invented by Jeremy...

Related posts brought to you by Yet Another Related Posts Plugin.

blog comments powered by Disqus
Business Web Hosting Review | Cheap Web Hosting Review | cPanel Web Hosting Review | Dedicated Web Hosting Review | Domain Name Hosting Review | eCommerce Web Hosting Review | FrontPage Web Hosting Review | Website Hosting Resources | Glossary

Web Hosting Review Link Partners

FAQ | Web Hosting Review Blog | Articles

Anti-SPAM Policy | Terms of Use | Privacy Policy | Contact Us | Copyright

Web Design
Content Protected Using Blog Protector By: PcDrome.