Ruby on Rails

From Wikipedia, the free encyclopedia

Jump to: navigation, search
Ruby on Rails
Developed by Rails Core Team
Latest release 2.3 / 2009-03-15; 23 days ago
Preview release 2.3.0 RC1 / 2009-02-1; 65 days ago
Written in Ruby
Operating system Cross-platform
Type Web application framework
License MIT License

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 which is used by web developers for rapid development.


[edit] History

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).[1] Heinemeier Hansson first released Rails as open source in July 2004, but did not share commit rights to the project until February 2005.[2] 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",[3] which was released in October 2007.

[edit] 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 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 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, Apache (either as a module - Passenger for example - or via CGI, FastCGI or mod_ruby), and many others.

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

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.

[edit] 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 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 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.

[edit] 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 you to generate a skeleton application with custom gems and configurations. Engines let you reuse application pieces complete with routes, view paths and models. Rails now includes Rack and Metal, which allows you to write optimized pieces of code that route around ActionController.[4]

On December 23, 2008, Merb 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.[5]

[edit] Trademarks

In March 2007 David Heinemeier Hansson filed three Rails related trademark applications to the USPTO. These applications regard the phrase "RUBY ON RAILS",[6] the word "RAILS"[7] and the official Rails logo.[8] 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.[9][10] In response to this criticism, Hansson made the following claims:[9] 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.

[edit] See also

[edit] References

  1. ^ Grimmer, Lenz (February 2006). "Interview with David Heinemeier Hansson from Ruby on Rails". MySQL AB. Retrieved on 2008-06-08. 
  2. ^ "37 Signals, Rails core team profiles.". Retrieved on 2008-07-15. 
  3. ^ Hansson, David (August 7, 2006). "Ruby on Rails will ship with OS X 10.5 (Leopard)". Retrieved on 2008-06-08. 
  4. ^ Hansson, David (March 16, 2009). "Rails 2.3: Templates, Engines, Rack, Metal, much more!". 
  5. ^ "The day Merb joined Rails". December 27, 2008. 
  6. ^ ""Ruby on Rails" Trademark Status". USPTO. Retrieved on 2007-08-01. 
  7. ^ ""Rails" Trademark Status". USPTO. Retrieved on 2007-08-01. 
  8. ^ "Rails Logo Trademark Status". USPTO. Retrieved on 2007-08-01. 
  9. ^ a b Forde, Pete (2007-07-23). "Beginning Rails: From Novice to Professional". Retrieved on 2007-08-01. 
  10. ^ Cooper, Peter (2007-07-24). "David Heinemeier Hansson says No to Use of Rails Logo". Retrieved on 2007-08-01. 

[edit] External links

Personal tools