Friday, September 2, 2011

Why Ruby-on-Rails ?

As a web developer you can raise few questions before choosing any new technology. Why should I go for RoR (Ruby On Rails) ? The first and most important reason is it is open source. It costs nothing to download and use. Is this enough for switching to RoR ? No there are other reasons. RoR has a compact design. It follows the MVC structure , which allows the developer to separate the business logic,design and control structure. The most interesting thing about RoR is , you can find a large community for the framework. There are hundreds of open-source contributors . You can find thousands of gems and plug-ins to integrate with your application. As a result your development becomes much faster in comparison to other scripting languages. Beside the gems and plugins, the scaffolding mechanism of rails , makes the development much faster. You only need to execute few commands on the command line and it will generate the code for you.

Seems interesting. PHP is open-source having a great community. Then what is the difference between PHP and RoR ?

There are couple of differences between PHP and ROR although both are open-source used widely.

  • Firstly we need to understand that PHP is a scripting language where as RoR is a framework based on Ruby. As I had mentioned earlier RoR uses MVC structure where as for PHP you need to explicitly design the architecture to follow MVC structure.
  • Also ROR is much more object oriented than PHP.
  • Again RoR includes a web-server while developing (the default web-server is WEBrick ) though you can use different web-servers like Mongrel , Apache, nginx , lighttpd , etc . But for PHP you need to install the web-server separately.
  • In comparison to PHP, RoR is remarkable for its use of javascript libraries for Ajax.
  • RoR coding is very simple because of its easy syntax and simple implementation since the framework is based on Ruby and it inherits the property of Ruby.
  • RoR is a rapid application development tool. Developing a website using PHP is fast and it is easy to learn PHP. But a new PHP developer can't develop an application in PHP in faster and secure manner. But in case of Ror a new RoR developer can do the same . This is because of RoR structure, coding style and features .

In real sense RoR is a truly rapid application development tool.

4 comments:

  1. All required information under one roof.

    very nicely documented... :)

    Between, I had some issues while starting rails server,

    fixed it by

    sudo apt-get install nodejs

    thanks

    ReplyDelete