Thursday, January 31, 2008

Building Web Applications with Ruby on Rails

Ruby on Rails has taken the web application community by storm. The Ruby programming language fuses ideas from dynamic, scripting languages with a strong object-oriented framework. Based on the popular Model-View-Controller (MVC) paradigm, Ruby on Rails, also called RoR and just Rails, is a web programming application framework written in Ruby. Rails leverages Ruby's extensive support for metaprogramming, from which it derives much of its elegance and ease of development. Additionally, Rails makes extensive use of code generation features, making it easy to start a complete application and promoting agile programming techniques.

The key design features that make Rails unique in the web application world are "Don't Repeat Yourself" (DRY) and "Convention over Configuration". The DRY principle means that settings, such as database column names, only need to be specified in one place. Rails ensures that these definitions are visible to all the other web components that need them. Similarly, the Convention over Configuration principle means that web developers only need to make explicit the aspects of their web application that are different from others; Rails (and programmers, too) can infer similar aspects from conventions, e.g., naming conventions. This greatly reduces the need to specify meta data aobut your web application in configuration files, largely eliminating the XML metadata bloat that is common in other web frameworks.

No comments: