Tuesday, August 08, 2006

Time to Get On Rails with Ruby

Ruby on Rails: - Very commonly heard phrase, (kind of, as it seems to me :-) ). Most of us who are even a little bit interested in tying something new, must have heard about the new (not quite new now !!) language (Ruby) with the fairly simple and powerful framework (Rails). Even if you have missed it by any chance, now the time has come to "Get on Rails with Ruby" because I personally feel that you cannot afford to miss it. Why?? Let’s Explore.

Before going into the explanation, why we should start using Ruby or start rolling on Ruby with Rails, let us get an idea of what is Ruby and Rails separately. So here we go with the definitions:

Ruby: This is another (not as, "Yet Another!!”) purely Object-oriented programming language originated in Japan in the early 1990s. The main feature that makes it popular among the web application developers or any developer in general is that it offers you cleaner and simper syntax. And a clean and simple syntax of course makes your application far easier to maintain, debug, test, and scale, all which is required to make our life simpler. Ruby is a mixture of good features of various other languages. For example, it is as easy to use and learn as Python, as conceptually elegant as Smalltalk, and as pragmatic as Perl. You can easily get an idea about the growing popularity of Ruby by the fact that now more and more English language books and documentation have become available on Internet about a programming language developed in Japan.

Rails: Rails is another a framework that itself is developed in ruby which is required to web applications with database-backend. So what? Is that the immediate question in your mind? Quite obvious. You need some solid reasons to even thinking of trying something. So here goes the simple reason: The very sentence that makes me go and try the framework immediately is that you actually can develop a web application many a times faster than using any other Java framework available till date and that also without compromising the quality you offer to your end-users!

But how?

Ruby language itself is the partial answer. This is because Ruby offers many a features that are impossible in other languages or too hectic to implement in some languages. And when coordinated with Rails, the advantage is doubled. This is because Rails exploit all the explicit features that Ruby offers to become allow you to develop faster and stronger web applications. Rails is able to exploit the feature because of the two basic principles that it follows: less lines of code and convention over configuration.

Less Software: As the word says means you need to write fewer lines of code to implement maximum of the functionality required by your application. After all which developer doesn't want to write as fewer lines of code as possible to get the maximum work done!! And this is made possible by combined power of the Rails framework and Ruby library. Smaller code in turn reduces the time you waste in debugging, understanding, maintaining, and enhancing your application in future.
We will also have a look at how is that shorter code to get maximum functionality possible with Rails.

Convention over Configuration: Rails do not require you to put hell lot of settings in various configuration files that are required by your current framework to run your application. Rails put an end to the complex XML configuration files. Rails instead believe in few simple conventions. As the conventions are understood by Rails, it automatically picks up the settings it requires to run your web application. This is made possible by utilizing the information that is already contained by your web application code and the backend database.


If it hasn’t clicked in your mind till now that you should explore further or try to use Ruby On Rails to enhance your web applications, then chuck it here itself, otherwise wait for the next post shortly coming up. In the next post, I would try to explain you Ruby On Rails with a small example so that you can try that yourself.

2 comments:

Jyoti said...

Nice article this was! I expect some more information on, for what sort of applications Ruby on Rails rates poorer than other Web programming languages, such as Java, PHP etc.

Sanjeev Kumar Mishra said...

Hi freakytechie,
I will definately provide you somethig on this very shortly. I am also learning and just sharing what I find interesting and feel that others should also know. Anyways thx for reading and considering the article good. :-)
cheers