Ruby on Rails

From Wikipedia, the free encyclopedia

Ruby on Rails

The Rails Application Default Page
Developed by Rails Core Team
Latest release 2.1.0 / June 1, 2008 (2008-06-01); 13 days ago
Written in Ruby
OS Cross-platform
Genre Web application framework
License MIT License
Website http://www.rubyonrails.com

Ruby on Rails is a free web application framework designed to make web development faster, simpler and more efficient. Often shortened to Rails, or RoR, Ruby on Rails is written in the Ruby programming language.

Contents

[edit] History

David Heinemeier Hansson, creator of Ruby on Rails
David Heinemeier Hansson, creator of Ruby on Rails

Ruby on Rails was extracted by David Heinemeier Hansson from his work on Basecamp, a project management tool by the web design (now web application) company 37signals.[1] It was first released to the public in July 2004. In August 2006 Apple announced that it would ship Ruby on Rails with Mac OS X v10.5 Leopard,[2] which was released in October 2007.

[edit] Philosophy

The fundamental Ruby on Rails principles include Convention over Configuration (CoC) and Don't repeat yourself (DRY).

"Convention over Configuration" means a developer only needs to specify unconventional aspects of the application. For example, if there's 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 one needs to write code regarding these names.

"Don't repeat yourself" means that information is located in a single, unambiguous place. For example, using ActiveRecord, the developer does not need to specify database column names in class definitions. Instead, Ruby can retrieve this information from the database.

[edit] Technical overview

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

Rails provides 'out of the box' scaffolding which can quickly construct most of the models and views needed for a basic website. Other helpful development tools come with or are installed with Rails, such as the WEBrick web server, and the Rake build system.

Rails is also noteworthy for its extensive use of the JavaScript libraries Prototype and Script.aculo.us for Ajax and its graphical interface.

For web services Rails initially supported lightweight SOAP; later it was replaced by RESTful web services. The recommended REST-based programming structure changed drastically in version 1.2.

[edit] Framework structure

Ruby on Rails divides itself into various packages, namely ActiveRecord, ActiveResource, ActionPack, ActiveSupport and ActionMailer. Prior to version 2.0, Rails also included the Action Web Service package which is now replaced by Active Resource. Apart from standard packages, developers can make plugins to extend existing packages.


[edit] See also

[edit] References

[edit] External links

Wikibooks
Wikibooks has a book on the topic of