The Philosophy of Web Application Development with Ruby on Rails

What is Ruby on Rails?

Xelipe
Ruby on Rails is a Rapid Application Development (RAD) framework for building dynamic web applications such as Twitter or 43Things. Ruby on Rails was originally written by David Heinemeier Hansson, commonly referred by his initials DHH, and was first released to the general public in July 2004. Since its initial release Ruby on Rails, also known as Rails, has gain a lot of press, hype, and developer's attention.

Ruby on Rails is built on top of the Ruby programming language. Ruby is a pure object-oriented and dynamic scripting language created by Yukihiro Matsumoto, commonly known in the Ruby community as Matz. Ruby on Rails draws a lot of its dynamic nature from the Ruby programming language itself. Another key strength of Rails is its opinionated nature. David Heinemeier Hansson has referred to rails as 'opinionated software.' Rails has strong opinions about how a web application should be composed and how subsystems should be configured together. Unlike existing Java frameworks which rely on reams of XML configuration files, Rails instead believes in Convention over Configuration. Ruby on Rails replaces the massive XML configuration files by a consistent naming convention and a standard directory location for the different types of files used in a Rails application. As an example of Convention over Configuration, Rails requires that the database tables be named in the plural, such as posts and users, that the primary key in each database table be named id, and that the foreign key from the posts to the user table be named user_id.

A key philosophical principle behind Ruby on Rails is commonly expressed as Don't Repeat Yourself (DRY). The idea behind DRYness is to minimized duplicate code. When you have duplicate code in different source files and later discover that that code has a bug, you would need to update several files. If you strive for code reuse, you minimize the impact of a software defect to one point in the source. At the application level you can reuse Rails code via helpers, or at the language level via class inheritance. Rails also allows for HTML snippet reuse via partials. But in addition to helpers, class inheritance, and partials, Rails has a great plugin mechanism where a you can import and reuse a large set of core Web 2.0 functionality. Rails has a large collection of Acts As plugins, such as Acts As Taggable which provides folksonomy and tagging support, Acts As Commentable which provides commenting support, and Acts As Authenticated which provides a user sing on authentication system.

The combination of Rails' philosophy of Convention over Configuration and Don't Repeat Yourself mixed with the meta-programming and concise features in the Ruby programming language make for a powerful web application framework. And to top it all, there is a large collection of plugins which will jumpstart your web development.

Published by Xelipe

I am a software engineer working for a startup in the financial services industry.  View profile

2 Comments

Post a Comment
  • OpenSocial Factory11/9/2007

    OpenSocial Factory - Where social networking applicatios come to life!
    Are you in need of a custom Facebook application or an OpenSocial application for social network? We are happy to build even the most robust applications to help promote your company in the realm of social media across any social network.
    Visit now: http://opensocialfactory.com or http://opensocialfactory.net

  • Facebookster11/9/2007

    Facebookster - We can provide a full range of facebook application strategy, design, development and marketing for your business. Our service offerings will allow you to maximize and leverage the facebook social graph of 32+ Million users.

    We have been providing new media strategy, consulting and development for Fortune 100 Clients & Start-ups for several years. Our team of consultants, project managers and programmers are intimately familiar with the DNA of facebook and how to build an application that meets your business requirements.
    www.facebookster.com or www.facebookster.net

Displaying Comments

To comment, please sign in to your Yahoo! account, or sign up for a new account.