Ruby On Rails is a full-stack (all parts needed for a web application), open-source web framework. It allows you to write efficient code by favoring convention over configuration. It was created in 2003 by David Heinemeier Hansson and since extended by Rails Core Team. It operates on all major operating systems like LINUX, OS X, and Windows and supports most common open-source Databases like MySQL and Postgre SQL, SQL Server, Oracle, and others. It uses any Web Server that supports CGI, the most popular being Apache and Lighttpd.
The entire framework is written in Ruby, a language whose popularity has shot up ever since rails came into the picture.
Because of ROR, programming appears now like a simple task. Powerful web applications that have formerly taken weeks or months to develop can be produced in a matter of days by RoR.
There is no doubt that web frameworks have exploded in popularity over the last few years, and while it is likely that a large part of that growth can be attributed to ROR, the outpouring of Model View Controller (MVC) frameworks in other languages are no less impressive.
Before we decide on a framework for a project, we should list its purpose and also know about the development team. Three considerations for the projects would be:
1. The primary focus of the application - Is it an e-commerce business, a social community, a messaging platform or a directory? If we’re building an eCommerce site, we may want to choose a framework with some baked-in libraries with proven extensions for dealing with payment processing. On the other hand, a light-weight messaging platform may need to scale very rapidly or use multiple servers and databases for load balancing and faster connectivity.
2. Hosting Environment - Some frameworks need additional PHP modules or software installation on the server, which may not be an option in the shared environments.
Furthermore, a lightweight framework on which everything is self-contained and highly portable may not provide the best feature for serious data manipulation or large information processing. For instance, some frameworks work best with MySQL while others include libraries for working with key-value and document store databases.
3. Strengths and weaknesses of developers - It is vital to get a sense of the skills and shortcomings of the developer who will actually build and support the application.
Some frameworks are more user-friendly and beneficial for beginners. Just as it is difficult to start speaking a new language, resistance to switch to a new framework is an acknowledged fact. But the strengths and weaknesses of each framework have to be laid bare to let the developer decide what is best for him.
Let's discuss ROR advantages over a very famous programming language i.e. PHP
ROR is Framework and PHP is Language. Recently various new standards in ROR are introduced which PHP frameworks are taking reference of (copying) such as CakePHP.
ROR includes a web server for development. In the case of PHP, a web server has to be installed for PHP
ROR implements MVC architecture. In the case of PHP, MVC framework has to be installed on PHP
ROR framework provides the Create-Read-Update-Delete (CRUD) functionality by using Ruby, In case of PHP, it is a language which doesn’t support this.
ROR uses a concept called “Convention over Configuration” which makes us follow conventions while coding, leaving us with little configuration to do. For instance, while creating a model class called “Post” the corresponding databases will be called “Posts” and the controller class will be called “PostsController. Furthermore, Rails has a nice feature called Scaffolding. Scaffolding lets us create useful prototypes for clients in superfast times. But we should be aware that it is deemed bad practice to use scaffolding code for actually building the final draft of a web application.
When working in a group, it can become difficult to keep track of changes to the database. While someone makes a change to the database, we could continue to write a code that expects the field to exist whereas it doesn’t. ROR fixes this problem with Migrations that automatically migrates databases whenever changes are made.
The growing popularity and demand for Ruby On Rails have been driven by successful companies who have benefited from the speed and agility of building software in Rails resulting in increased productivity, efficiency and company growth. Around 200,000 sites are using ROR a measure of the success and utility of this framework!