A Business View of Ruby on Rails

Ruby on Rails

If your company does anything with software on the web (sometimes called “Software as a Service” or SaaS) then you’ve already heard about Ruby on Rails. For smart people with non-IT backgrounds, this post will answer a few key questions:

Note: A version of this post was originally published by WisdomGroup and re-published by ChicagoRuby.

Why Ruby on Rails?

Ruby on Rails helps developers write better web apps in less time with fewer errors. Time is money. Businesses measure results in currency. Rails enables developers to deliver.

Ruby: The Language

Ruby on Rails consists of two main components: A programming language called Ruby, and a Web development framework called Rails. It is customary to refer to “Ruby on Rails” as simply “Rails.”

Ruby is an object-oriented language. Certain problems in software development are easier to solve with an object-oriented approach. A good software solution will be easier to maintain. Easier maintenance means a longer, revenue-generating lifespan for the code. Software that makes money is always welcome!

Rails: The Framework

Rails is a framework written in Ruby. One of the best ways to define Rails is to describe the problem that it solves.

Creating a web app can be time-consuming because of all the details that must be tracked and managed. How does the app connect to the back-end database? How does information get pulled from the database for display on the screen? As users, we take well-built web apps for granted. However, every element of every page must be clearly defined and thoroughly tested before users visit the site. Every text box, every drop-down arrow, every data field (credit card number, expiration date, etc.) must be programmed and thoroughly tested before any users visit the site.

Before Rails, developers had to make every decision from scratch for each new web app. It was like having to invent the wheel every time you assembled a bicycle. What a waste of time! It’s smarter to invent the wheel once. And then you can use variations of that wheel for other vehicles like automobiles and tractors.

Gems are Libraries

If you’ve spent any time around Rails developers, you may have heard the term “gem” in conversation. Gems are libraries of functions that get used over and over from one code base to the next. Gems are one reason why Ruby developers are so productive. We only invent the wheel when we have to. Otherwise, we’ll use a gem that has the wheel functionality that we need.

Gems enable Ruby developers to spend less time re-inventing the wheel and more time writing code that is specific to the business problem at hand.

By the way, Rails is a gem.

Rails is a Gem?

That’s right, Rails is a gem. Rails was extracted from a web-based project management application called Basecamp. After writing the code for Basecamp, David Heinemeier Hansson (the developer) realized that he and his team might want to write other applications for the web with behavior similar to Basecamp. So DHH extracted the non-Basecamp-specific code from the app, bundled it into a gem, and called the gem Rails.

Imagine if you were the first person to invent The House. While inventing the house, you invent new features like doors, windows, and water faucets. After building the first house, you decide to build more houses. You save time on future houses by using some of your inventions from the first house: Doors, windows, and water faucets.

Rails Automates Repeated Tasks

Rails automates time-consuming, repetitive tasks (things that were once done manually) so that developers can focus on solving problems for your business.

Here’s an example from another profession. Can you imagine an accountant’s life without a spreadsheet like Microsoft Excel? Maybe you don’t have to imagine! You might recall the days of paper spreadsheets, pencils, and 10-key hand-cranked calculators.

Rails is to software developers as electronic spreadsheets are to accountants. Both tools make their respective professionals more productive by eliminating repetitive tasks.

Rails Has Its Limits

Rails and spreadsheets both eliminate grunt work. At the same time, they both have limitations. Neither is a replacement for rational thought. For example, knowing how to use a spreadsheet won’t make you an accountant because you still need to understand tax law and discounted cash flow analysis. Likewise, a developer who knows Rails must also understand object oriented programming and relational database theory in order to create a workable piece of software.

More Learning

If you would like to dive into the details of Rails, you might want to: