|
|
|
|
|
Ruby On RailsRuby on Rails is an open source web application framework written in Ruby that closely follows the Model View Controller architecture. It strives for simplicity, allowing real-world applications to be developed in less code than other frameworks and with a minimum of configuration. The pieces of the MVC puzzle in Ruby on Rails are as follows: - Model (the classes representing RDBMS tables) are handled through ActiveRecord class. Usually, all the programmer needs to do is to subclass ActiveRecord, and the program will automatically figure out which RDBMS table to use and what columns the table has. Relationships between tables are specified with simple commands.
- View (the display logic) is done as a fragment of HTML with Embedded Ruby interspersed. The actual code is part of Rails' ActionPack, but programmers rarely need to touch it outside of Embedded Ruby. For each method in controller that needs to display user output, a small HTML/code fragment needs to be written. The page layout is described separate from the controller action display layouts, and the fragments can also call other fragments.
- Controller (the actual application logic) class is handled through Rails' ActionPack, which has class ApplicationController. Rails applications simply subclass ApplicationController and write required actions as methods, which can then be accessed through the web. Rails also provides scaffolding, which can quickly construct most of the logic needed to do common operation.
The internals of Rails are largely managed by dependency injection and the Needle module. Rails provides support for a number of database back-ends, and also interacts with Embedded Ruby via rhtml. Ruby on Rails was created by David Heinemeier Hansson for use in the development of Basecamp, a project-management tool. It was first released to the public in July 2004. External links *Project homepage
|
 |
|
| Copyright 2005-2009 OnPedia.com. All Rights Reserved |
|
|