0
Posted March 12, 2013 by Spyros in Ruby on Rails
 
 

The Pros and Cons of Using Ruby on Rails

railslogo
railslogo

What exactly is Ruby on Rails?

Ruby on Rails often referred to as RoR or Rails is commonly defined as an open source full-stack web application for use with Ruby, a general purpose programming language. As a full-stack framework, Rails empowers web developers to create applications and web pages, which query the database or display information obtained from the web server. The application also features a routing system, which operates independently from the web server. Some of the principles and development patters which are featured in Rails include MVC (Model-View-Controller), don’t repeat yourself, convention over configuration and active record pattern. Ruby on Rails is a relatively new application even though Ruby predates Rails by almost a decade. There are many misconceptions and prejudices related to its use among developers. By discussing the advantages and disadvantages of Rails, I hope to help emerging developers decide if Rails suits their development requirements.

The Advantages of Using Ruby on Rails

The primary advantage of Rails is its simple and clean syntax/scripting, which is very close to natural language. Due to this it preferred by the beginners and on the long term, the coding for any application or page is easier to maintain. As it a part of an open source project, Rails is available for free and advanced users can easily modify or improvise the code as per their requirement. Thousands of free gems and plug-ins are available, which provide additional functionality/customization to the final webpage/application.

Another advantage of RoR is its flexibility, which allows developers to explore multiple programming paradigms, a feature which is lacking in Java, PHP etc. This flexibility plays a crucial role in decreasing the overall configuration and coding requirements needed for developing a new page or applications. This usually translates to substantial time savings for the developer, company and client. Moreover, codes generated using Rails are easily reused and ported for use in other projects.

Additional advantages are directly linked to its core principles such as don’t repeat yourself and convention before configuration. Don’t repeat yourself principle ensures that every bit of code is free of ambiguity, which eases many long-term maintenance issues, which may arise with an object-oriented language such as Ruby. By minimizing boiler-plate code Rails ensures that application/webpage codes are easier to understand/find as and when necessary. By placing precedence on convention as compared to configuration, Rails ensures that the developer gains access to preset configurations, which generates time savings during development.

A less commonly known advantage of using RoR is its inbuilt security features, which allow application/web pages developed on rails to be unaffected by SQL injection attacks. Moreover, Rails is also capable of preventing Cross site scripting attacks, which often appear as a vulnerability of Java and PHP-based applications. These are only a few of the advantages that RoR provides to developers and users the actual list of advantages is much longer.

Limitations of Using Ruby on Rails

According to many programmers, the primary limitation of Rails is the use of Ruby, which being a relatively new object oriented language, is unable to support many legacy systems. Moreover, the libraries available for Ruby is comparatively limited, which also affects the overall usability of Rails for many applications/web pages. As Rails was developed relatively recently as well, support problems tend to arise, if something goes wrong. Many also deem it unsuitable for use in the development of business-critical applications as there is currently no backup system if the application crashes.

Additional problems arising from Rails are related to scalability specially in case of existing applications developed using the web application. Ruby is also comparatively more resource hungry in comparison to Java and PHP, hence, while scaling up, additional resources are required to ensure smooth operations. Moreover, there is a lack of experienced RoR programmers in the market, which is perceived as a risk by the software companies. The unavailability of extensive documentation for RoR also has an additional fall-out in the form of undocumented behavior of applications created using Rails.

Finally, there is a currently a lack in the availability of usable IDEs for Ruby along with the absence of a market-ready common application server, which has held back widespread use of Ruby by software development firms and programmers all over the world. These are the main limitations of RoR, which have come to light over the years and though the list is definitely not exhaustive, it is expected to help software programmers decide whether to use Ruby or stick to traditional languages such as Java for developing their web pages/applications.

This was a guest post by Abhishek. Abhishek is currently working with eXtendCode, a Software Development Company in India, which provides software solutions such as Java Application Development, Open Source Application Development, Data Base Solutions, Mobile Application Development and Quality Assurance Services etc.


Spyros