Speeding up Ruby on Rails
Jul 30, 2010, 20:04 (0 Talkback[s])
(Other stories by David Berube)
Desktop-as-a-Service Designed for Any Cloud ? Nutanix Frame
[ Thanks to An Anonymous Reader for
this link. ]
"The Ruby language is often cited for its flexibility.
You can, as Dick Sites said, "write programs to write programs."
Ruby on Rails extends the core Ruby language, but Ruby itself makes
that extensibility possible. Ruby on Rails uses the language's
flexibility to make it easy to write highly structured programs
without much boilerplate or extra code: You get a large amount of
standard behavior with no extra work. Although this free behavior
isn't always perfect, you get a lot of good architecture in your
application without much work.
"For example, Ruby on Rails is based on a Model-View-Controller
(MVC) pattern, which means that most Rails applications are cleanly
split into three parts. The model contains the behavior necessary
to manage an application's data. Typically, in a Ruby on Rails
application, there is a 1:1 relationship between models and
database tables; ActiveRecord, the object-relation mapping (ORM)
that Ruby on Rails uses by default, manages the model's interaction
with the database, which means that the average Ruby on Rails
program has very little, if any, SQL coding. The second part, the
view, consists of the code that creates the output sent to the
part, the controller, turns input from the user into calls to the
correct models, then renders a response using the appropriate
"Proponents of Rails often cite this MVC paradigm — along
with other benefits of both Ruby and Rails — as increasing
its ease of use, claiming that fewer programmers can produce more
functionality in less time. This, of course, means more business
value for each software development dollar, so Ruby on Rails
development has become significantly more popular."