Ruby on Rails

September 26th, 2004 § 1 comment

A couple months ago, I was searching for a simple Wiki application that I could run locally to use as a notebook, a journal, and a general scrapbook. I had quite a few requirements, two of them being that it needed to support Markdown, and that it should run without a database. Although I have full development support in my home machine for the tools I use, I wanted something simple that would be easy to set up and that would make backup and restore a matter of copying files.

After a quick search, I found Instiki. I needed only a couple minutes to realize it was exactly what I was looking for. I downloaded it, run the main file, fired its main page on the browser, and started writing. And it did support Markdown. Instiki is written in Ruby and ships with a embedded Web server. It can also be used under Apache with Apache’s ProxyPass and ProxyPassReverse directives, and it’s fantastically adequate to my needs.

When I was reading about it, I noticed it was based on a Ruby framework called Rails. At the time, I didn’t pay notice to the framework because, except for the Wiki, I had no other interest in Ruby. Nonetheless, Ruby continued to be on my radar because of some readers and fellow bloggers. I knew that the language was considered to be powerful and productive, much like Python and Smalltalk, but I didn’t investigate further because it didn’t sound so attractive to me, semantically or syntatically, despite its apparent merits. Rails continued to be on my radar too, popping up here and there in blogs and articles.

A month or so later, I finally decided to take a serious look at it, and downloaded the introductory video. I must confess that it completely blew me away. Although I’ve researched, used, and developed a lot of Web frameworks, Rails really impressed me.

Rails is both a Web application framework and a persistence framework. It’s based on MVC, and it’s the first MVC framework I’ve seen that hides the complexities of developing that way. Even programmers who never heard or read about MVC would have no trouble understanding how Rails work, and how they could use it to create their own applications. Unexperienced programmers, I’m sure, would be quite productive, comparatively speaking, using the framework because it focus on what it’s really important, which is the application itself.

Unlike some frameworks like Borland’s WebSnap and Microsoft’s ASP.NET, it doesn’t bog the user down in a mire of configuration files, state keeping, and unnecessary relationships between parts of the application. Rails allows the user to express the logic behind the problem domain in a readable and intelligible way. The user is not forced to understand the inner details of the framework to avoid making mistakes.

Since it was written in Ruby, Rails is easy to deploy too. Many hosting provides have current versions of Ruby installed, and Rails will also run under the Ruby Apache module or under FastCGI.

A interesting fact about Rails is it’s size. Rails is a just little over one thousand lines of code in size, which is mininal for a framework that does so much. It hides development complexity so well that Basecamp, a project management package written using it (in truth, Rails was developed for Basecamp) has only four thousand lines of code (not including Rails) and was developed in two months by a single programmer.

As you can see, I’m thoroughly impressed with Rails. I will be using it in an application I started developing a couple weeks ago, and I’m sure I’ll be more productive that I would be if I were using PHP. I still have to get used to Ruby, but I don’t think I’ll have problems with it.

If you never heard of Rails before, take a look at the video. You will only need ten minutes of your time, and you’ll get to know a framework that, in the worst case, will be a worthy addition to your toolset in the next time you need to quickly create a Web application.

§ One Response to Ruby on Rails

  • nate says:

    I too have really started to fall in love with Rails. I have been a Java developer for many years now, and it’s still what pays all my bills these days. But having set up Ruby/Rails, I am impressed with:
    – how much I can get done with so little code.
    – managing third party software with Gem is incredible. You will never want to mention the word Classpath and Jar file ever again.
    – where are the configuration files? :)
    – how much excitement developers have over this framework. Its great to be a part of something people are excited about working in again.

    I wrote a tutorial at http://www.inventric.com/blog/#110660879550548217 about how to get Ruby/Rails installed at an inexpensive webhost where it isn’t installed by default.

What's this?

You are currently reading Ruby on Rails at Reflective Surface.

meta