JavaScript Editor Free JavaScript Editor     JavaScript Debugger 

Main Page

Previous Page
Next Page

13.1. What Is Ruby on Rails?

A single word in the English language, in my opinion, sums up what Ruby on Rails is: synergy. Just in case you're unaware of the meaning of the word synergy, it roughly means that the whole is greater than the sum of its parts. Need a few examples of synergy? How about chocolate and peanut butter? Individually, either ingredient is good, but put them together and, well, yum!

With Ruby on Rails, instead of chocolate and peanut butter, there is Ruby and Rails. This realization leads me to two additional questions. The first is "Beyond being a deep-red corundum crystal, just what is Ruby?" There is, after all one thing that I am certain of, and it is that Ruby is a language and not a mineral, although it is possible to create a laser using a ruby, and lasers are the meat and potatoes of most mad scientists.

13.1.1. Ruby

The Ruby that is referred to in this chapter is an object-oriented programming language created by Yukihiro Matsumoto of Japan in 1993. In Japan, not surprisingly, Ruby quickly became quite popular, with home-field advantage and all that kind of stuff. However, because of its price tag of zero (it is, after all, an open source language), Ruby began to catch on outside of Japan. Yes, against all odds, Ruby become something of a phenomenon.

Although some might consider it odd that an open source language from a land far away from our little piece of the universe planted the seed of the idea of Ajax, I do not. I, for one, am open to ideas, regardless of the source. Alright, I'm a little more open to the ideas that relate to food, but, then, I'm one of those developers who eats anything that doesn't try to eat me first.

The interesting thing is that, even with people like me, mad scientists without enough time who like sushi and green tea ice cream, Ruby's popularity was growing only slowlyfaster than a bonsai tree, but slower than Godzilla, Pokemon, or Yu-gi-oh. Fortunately, something changed back in 2004. No, radiation was not involved, but what happened is that Ruby got Rails.

13.1.2. Ruby on Rails

The word Rails is rather interesting; it brings up connotations of a sleek, silent, fast electric train moving into the future. That's a pretty nice connotation, especially when tied to web development, which, in my opinion, more often resembles a runaway steam train with no brakes on a downgrade, going into a hairpin curve during a snowstorm on Monday. In short, the average project is an accident waiting to happen. The accident might never happen, but the potential is there regardless. Rails is a full-stack programming framework implemented in Ruby whose purpose is to smooth the development of web applications.

Created by a Danish college student, David Heinemeier Hansson, Rails is open source and is based upon two simple principles. The first is that fewer lines of code equal fewer coding errors. This is a sensible idea because smaller, tighter code requires less time to write and debug. This remaining time could then be put toward testing or toward the inevitable feature creep that rises like a monster from a slab.

The second principle of Rails is configuration. Unlike many environments, Rails doesn't use configuration files. Instead, Rails uses information in application code itself to determine its configuration. This eliminates the "Doh!" factor that occurs whenever an application is moved to another environment, even when the environment is merely another developer's laptop. Although I can't speak for anyone else, I do know from personal experience that configuration files are one of those things that fall through the cracks about 20 percent of the time.

Previous Page
Next Page

Bitcoin Gambling Site

JavaScript Editor Free JavaScript Editor     JavaScript Debugger