Ruby on Rails

From Wikipedia, the free encyclopedia

  (Redirected from Ruby on rails)
Jump to: navigation, search
Ruby on Rails

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

Ruby on Rails is an open source web application framework for the Ruby programming language. It is often referred to as 'Rails' or 'RoR'. It is intended to be used with the Agile development methodology, which is often utilized by web developers for its suitability for short, client-driven projects.

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 now web application company 37signals.[1] David first released rails as open source in July 2004, but didn't share its commit rights until February 2005.[2] In August 2006 the project reached a milestone when Apple announced that it would ship Ruby on Rails with Mac OS X v10.5 Leopard,[3] which was released in October 2007.

[edit] Technical overview

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

Ruby on Rails features several tools intended to make commonplace development tasks easier 'out of the box'. Rails provides scaffolding which 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 system, a basic development environment is in effect provided with all versions of the software.

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

[edit] Framework structure

Ruby on Rails is separated 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] Philosophy and Design

Ruby on Rails is intended to emphasise Convention over Configuration (CoC), and the agile programming 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'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. In general, this leads to less code.

"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.

[edit] See also

[edit] References

[edit] External links

Wikibooks
Wikibooks has a book on the topic of
Personal tools