Ruby on Rails
Ruby on Rails (RoR) is a framework for web development that is powering the Web 2.0 industry. Ruby is the language that RoR is based on and Rails is the framework developed by David Heinemeier Hansson. Features such as a login, blog, and pay pal features are common to many websites the idea behind Ruby on Rails is to enable the website developer to quickly add tools to allow the developer to concentrate and improving the usability and design rather than coding.
David Heinemeier Hansson was contracted by 37 Signals to code a Project Collaboration site for their company. At the time 37 Signals was a web site design company whose partners lived in different parts of the USA. In order to work together and increase their communication they envisioned a simple, useful site what would allow them to tracks tasks, post to do lists, and leave messages for each other. David Heinemeier Hansson was tired of Java and PHP as they no longer seemed “fun� to program with.
Given a long deadline he decided to try out Ruby for the 37 Signals project website. After learning Ruby and working on the project he noticed that he had built many of the tools that are common in many websites: Discussion boards, blogs, comments, and login interfaces; to name a few. The Rails portion of the framework developed organically from this work and was released to the open source community in 2004. From this collaboration the framework has matured quickly by users posting and sharing their Rails Recipe’s with the open source community.
Rails is a Model-View-Controller (MVC) framework similar to Java Frameworks like Tapestry. Ruby is an object oriented programming language that’s style is similar to Lisp. Rails also includes integrated web services support, reception of incoming emails, AJAX, a full unit testing framework, and isolated development environment.
Rails lends itself two important principles: don’t repeat yourself and convention over configuration. Automated code generators allow the programmer to quickly begin developing an application rather than having to set up all the MVC files and folders. Using the Rails framework the programmer can work closer with a client by making changes to the web application and then refreshing the page.
Ruby on Rails has been used to develop many Web 2.0 applications. The project collaboration website at www.37signals.com was the first. The social networking wine review site at www.corkd.com is another. www.odeo.com also used Ruby on Rails to power is creative way to share audio files and pod casts. The Web 2.0 idea is to come up with an idea, throw it up on the web and if it works the money will follow. Rather than start with venture capital or seed money, you keep control over your idea and develop it organically according to user feedback. Ruby on Rails is the natural framework to develop such web 2.0 applications.
How easy? I visited the rubyonrails.com site and downloaded the required files. First, though I created a Windows XP Virtual Machine with VM ware for a clean installation. After adding Apache and MySQL I installed the Ruby files, followed by Rub Gems. Finally using Ruby Gems I installed the Rails Framework. I wanted to use the RadRails application for developing Rail web apps, so I installed that as well.
All that and you are good to go; sound too complicated? Your right, it is, instead just install the InstantRails.exe file found at www.rubyonrails.com and you can start immediately using a self contained RoR environment, complete with Apache and MySQL.
After following their on-line tutorial I had a relational MySql database running my first Rails web application. The tutorial teaches some basic command to get an online cookbook running on any browser. The tutorial took me about 2 hours to complete including configuring the Instant Rails installation. All in all I was pleased with the speed of learning to use the framework with Instant Rails, and impressed by the ability of the framework to put together a small application in such a short time.
References:
1. David Heinemeier Hansson Blog, http://www.loudthinking.com/
2. Inside the Net, Episode 30, http://www.twit.tv/ITN
3. RoR tutorial, http://instantrails.rubyforge.org/tutorial/index.html
4. Download Ruby, http://rubyonrails.com/
5. Agile Web Development with Rails, 2005, the Pragmatic Programmers bookshelf ltd. PDF version.
6. Agile Manifesto, http://agilemanifesto.org/
7. RadRails Windows IDE for Rails, http://www.radrails.org/