MAIN MENU
ADVERTISEMENT
TOP 10 LIST
RESOURCES
ADVERTISEMENT

Ruby: An Introduction

Ruby is a dynamic scripting language for programming all sorts of versatile operations, from processing text files to performing system management duties. It is an object-oriented programming language that was invented in 1993 and released in 1995 by Japanese programmer Yukihiro Matsumoto (fondly referred to in programming circles as "Matz") as an alternative to the likes of Python and Perl. It was designed to be simple, straight-forward, portable, and extensible. Best of all, it's an open-source development language, meaning that Ruby is completely free, both to own and use as well as to copy, alter, and disseminate.

Because of the nature of scripting languages in general, much of the material presented below may be "over the heads" of the non-programming-savvy, but we've made every effort to explain Ruby in as plain-spoken a manner, and with as little technical jargon as possible. However, in consideration of those actual programmers reading this article, you'll find a partial list of Ruby's features - some of which you may recognize - at the bottom of this page.

For those less technically-savvy readers wishing to enjoy Ruby's artful conveniences, we recommend an open-source (read: free!) software product called Ruby on Rails (check out our article on Ruby on Rails). Ruby on Rails is full of user-friendly tools for building potent web applications using Ruby.

What programmers seem to like best about Ruby is that, unlike so many languages that claim to be object oriented but are actually only partially so, Ruby is a pure object oriented language. Everything in Ruby is an object.

Ruby is a logical and well-organized language and, as such, is easy to learn (if you know the first thing about programming, that is). Ruby takes the purity of a true object oriented language like Smalltalk and gets rid of all the awkward syntax, replacing it with more conventional file source code. Yet as simplistic as Ruby is considered to be, it is as powerful and flexible as other languages you may already be using. Ruby is a utilitarian language in that it requires the absolute minimal amount of coding to achieve your desired result. It values accuracy and conciseness.

One of Ruby's greatest features is an Interpreter Shell where programmers can experiment with the language, viewing and evaluating its efficacy for the tasks assigned in real-time. By trying out the code and editing as you go, you avoid the grim likelihood of being held up time and again in the debugger.

As its creator says in his forward to the reference book mentioned below, Ruby was designed "to solve problems, not spoonfeed compilers." He wanted to design a language that adapted to human needs rather than enforcing its own, "arbitrary, rigid rules".

Now here comes the jargon - Ruby includes many of the features programmers have grown accustomed to in their current, chosen scripting language - be it ADA, C++, CLU, Eiffel, LISP, Python, or Smalltalk - including:

  • Multithreading

  • Mixins

  • Singleton Methods

  • Exception Handling

  • Fully-integrated Closures and Iterators

  • Automatic Mark-and-Sweep Garbage Collection

  • Proper Metaclasses (or Meta-Classes)

  • Fully regular expression support

  • Functions that give access to the operating system running Ruby

  • Fully-featured Debugger that includes:
    o Breakpoints based on conditional expression evaluation
    o Facilities for variable monitoring and inspection

You can find an excellent - and totally free - HTML formatted online manual to using Ruby (authorized and approved by Matz himself), called Programming Ruby: The Pragmatic Programmer's Guide, First Edition at www.rubycentral.com/book.

Looking for a web host that supports Ruby? Check out our BlueHost review

Featured Articles

Hosting-Review is an independent provider of web hosting reviews. We base our reviews on knowledge, personal experience with webhosts and user feedback.

Web Hosting Plan Reviews: 12 definitions to know

Server Hosting Providers: Questions to ask when shopping for web server hosting

The Cheap Hosting Plan: The bargain that can cost you more than money

All About Dedicated Hosting

All About Linux Hosting

Business Web Hosting: Important Features in Business Web Site Hosting

Domain Name Hosting: It's all in the name

Virtual Web Hosting: Virtual web hosting's very real benefits for your web site

Intro to ASP Hosting: ASP Hosting Explained

Cold Fusion Hosting: An Introduction

Colocation Hosting Defined

About PHP Hosting

Reseller Hosting

Ruby: An Introduction