Ruby on Rails

Ruby on Rails

Infobox Software
name = Ruby on Rails



caption = The Rails Application Default Page
author =
developer = [http://www.rubyonrails.org/core Rails Core Team]
released =
latest release version = 2.1.1
latest release date = release date|2008|09|04
operating system = Cross-platform
platform =
language =
programming language = Ruby
genre = Web application framework
license = MIT License
website = [http://www.rubyonrails.com 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 an Agile development methodology, which is often utilized by web developers for its suitability for short, client-driven projects.

History

Ruby on Rails was extracted by David Heinemeier Hansson from his work on Basecamp, a project management tool by now web application company 37signals.cite web
first = Lenz
last = Grimmer
date = February 2006
title = Interview with David Heinemeier Hansson from Ruby on Rails
url = http://dev.mysql.com/tech-resources/interviews/david-heinemeier-hansson-rails.html
publisher = MySQL AB
accessdate = 2008-06-08
] Heinemeier Hansson first released rails as open source in July 2004, but did not share its commit rights until February 2005. [cite web
url = http://www.rubyonrails.org/core
title = 37 Signals, Rails core team profiles.
accessdate = 2008-07-15
] 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", [cite web
url = http://weblog.rubyonrails.org/2006/8/7/ruby-on-rails-will-ship-with-os-x-10-5-leopard
title = Ruby on Rails will ship with OS X 10.5 (Leopard)
accessdate = 2008-06-08
last = Hansson
first = David
date = 7 August 2006
] which was released in October 2007.

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.

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.

Philosophy and Design

Ruby on Rails is intended to emphasize "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 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. 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.

See also

* List of web application frameworks
* Comparison of web application frameworks

References

External links

* [http://www.rubyonrails.com/ Ruby on Rails official website]
* [http://www.railslodge.com RailsLodge plugin directory]
* [http://rubyforge.org/ Ruby Forge]
* [http://www.railscasts.com/ RailsCasts:] These screencasts are short and focus on Ruby on Rails technique


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”