Ruby on Rails
Mitchell Craig; Tam Nguyen; Becker Luu; Eliezer Mar Manarang; and Colin Williams University of Calgary SENG 403 Dr. Kremer
Abstract—The proceeding document describes the Ruby on Rails web application framework. A history is provided, along with the founding Philosophies and Priciples, Technical Infor-mation, Notable Applications and a comparison to competitors. A short tutorial is provided as an example.
I. INTRODUCTION
Ruby on Rails [1] (often referred to as Rails or RoR) is an open source web application development framework that is written in the Ruby [2] programming language. The Ruby on Rails framework is designed to make programming web applications easier by making assumptions on what the developer requires to get started on their applications. Ruby on Rails is a development tool which assists developers in building websites and applications because it abstracts and simplifies the commonly used and repetitive tasks. What this means is that the programmers only have to write new code in areas where their application differs from the standard conventions. Using Ruby on Rails, the programmers are able to write less code while producing more output than with other development frameworks. Highlighted in this report is an overview of the philosophies and principles behind Ruby on Rails, an in-depth look at the technical aspects of the framework as well as comparisons to other similar technologies. Finally, the report includes a tutorial on getting setup with the Ruby on Rails framework and getting started with developing a simple web application.
II. HISTORY OFRUBY ONRAILS
Ruby on Rails was created in 2003 by David Heinemeier Hansson. Hansson developed the original framework for Rails while he was working on Ruby-based projects for 37signals[3], a web application company. Rails was ex-tracted from some of Hanssons work on Basecamp, a project management tool developed by 37signals.
Rails was first released publicly released in July 2004 as an open source project. The project had reached a milestone in 2006 when Apple announced that Ruby on Rails would be bundled together with Mac OS X v10.5 Leopard which later released in 2007.
The Rails framework is based on established principles that had been proven successful elsewhere and is focused on practicality which is the reason behind why it has become so successful. With the release of Ruby on Rails, Ruby has risen to become a prominent alternative for other classic languages such as PHP and Java for developing websites and
web applications. Thousands of web applications around the world have been developed using Ruby on Rails with some notable examples such as Twitter, Yellow Pages, Github and Hulu. Today, the Rails framework is supported by the Rails core team consisting of a dozen members who have been given the keys to the source repository as well as more than 2,100 contributors to the project. The framework is supported by a vibrant ecosystem which includes various choices in hosting, tools, editors, conferences, workshops and consultants.
III. PHILOSOPHIES ANDPRINCIPLES
There are three primary philosophies or principles[4] be-hind Ruby on Rails: Convention over Configuration (CoC), Dont Repeat Yourself (DRY) and Representational State Transfer (REST).
The first key principle is Convention over Configuration. The Rails framework is designed with conventions that tell you how you should structure your code, how to name your classes and files and how to organize your databases and tables. The framework makes large assumptions about what you want to do and how you want to do it so that you dont need to explicitly specify it. The benefit of having these conventions is that it simplifies and reduces the amount of code that you actually need to write when developing your web application. What this means when developing is that only the unconventional aspects of the program need to be written. This allows for better productivity and high efficiency since the repetitive or common tasks are already automatically completed for you. Of course, there is the option to ignore these conventions and structure the code to your own preferences but this means that more unnecessary work is being done. This principle makes Ruby on Rails a bit of an opinionated framework[5] and is largely a reason why the framework is named Ruby on Rails. If you decide to follow the conventions that have been set out, you will enjoy the benefits of using Rails for developing your applications. If you dont conform to the style that the framework was built on, it may not work well for you.
The second key principle is DRY which stands for Dont Repeat Yourself. This principle suggests that writing the same code over and over again is a bad thing. The main idea behind the DRY principle is that it promotes the reuse of code as often as possible rather than duplicating and rewriting similar code in multiple places. Ruby on Rails follows the DRY principle to help in maintaining clean code
and reducing the chance of errors in the code. Having DRY code in your program means that changes only need to be made at one location rather having to revise changes in all different locations. If an error were to occur, it would be a lot more traceable and easier to detect the root cause of the error. Rails is designed with and provides libraries that assist in writing DRY code.
The last principle of Ruby on Rails is REST or Repre-sentational State Transfer[6]. This is not one of the primary philosophies of Ruby on Rails but in recent years, the Rails community has moved towards following the RESTful architecture. Unlike the other philosophies of Rails, it is not a requirement for the application to follow a REST design. It is encouraged that developers follow the REST design and the framework provides tools that make it easier to do so.
REST is a pattern for making web applications which organizes the application around resources and standard HTTP verbs. With REST, there are three key ideas. The first is proper identification of resources, the second is the manipulation of the resources and the last is to have self-descriptive messages that are easy to interpret. Resources are often the core model objects in the program. The main idea behind the RESTful design is to identify and manipulate resources using a standard convention that is self-descriptive. As an example, the following HTTP request, DELETE /photos/17 can be easily understood as referencing a photo resource with an ID number of 17. The standard HTTP verb being used in this case is the delete functionality. The purpose behind using REST in Ruby on Rails is to provide a simplified design pattern that is clear and straightforward. This can be especially helpful if the application being developed is an open source project. Following a common pattern like REST for all applications using Rails means that all developers will have a good understanding of the coding style and practices.
The philosophies and principles of Ruby on Rails are very closely related within the framework. They all aim towards simplifying and making the process of developing web appli-cations as simple as possible. Convention over Configuration focuses on making the development process straightforward and increasing productivity by abstracting the common and repetitive tasks so that the developer only needs to be focus on the new aspects to be implemented rather than having to worry about the unnecessary conventional aspects. The DRY philosophy focuses on having to write code only once and reusing it as much possible when that particular functionality is needed. Once again, this increases productivity since it reduces the amount of code that needs to be written. It also helps because it allows for better traceability of the code which makes it easier to make revisions. Following the RESTful design, the design of code follows a certain standard which all developers can interpret and understand. When Ruby on Rails is used with these principles and philosophies in mind, the result is having cleaner and more
reliable code. Less work and code is required from the developers which results in higher productivity.
IV. TECHNICALINFORMATION
This section describes Ruby on Rails[7] basic technical information: the structure on how it works, classes that are needed for development, and the framework that it supplies aiding the web application development. Also, some tools for deployment of the application is tackled briefly. The in-formation stated here are mainly learned/cited from sources [8], [9], and [10] for the system architecture/information and development tools, and [11] contains the recommended tools for deployment.
A. Introduction
Ruby on Rails is a development framework for developing a web application. Rails offers libraries for development ranging from the user interface up to managing the data and processing it. This is why Rails is called a full-stack web application development framework - usable to create all functionality of a working web application.The availability of the different libraries and given the founding philosophies of Rails, which is the basis of a Rails project default con-figuration, are giving Rails the ability to automatically link different aspects and classes of a created project resulting for the developers ease of use of the system. Though the drawback of following a default configuration for the Rails framework is that it offers little flexibility on configuration management and design for the developer. The basic features that Ruby on Rails provides for the application development are: [10]
• HTML [12] templating (which involves the view com-ponent of the application).
• Database storage/retrieval (involves the model classes in the application).
• User Web browser requests and response (involves the controller classes in the application).
• HTML form handling. B. Directory Structure
When creating a project on Rails, Rails creates a prede-fined directory structure to contain the files needed for the project to work. Below are the directory names that could be seen in a Rails project, and a brief description of each: [10]
app
The folder that contains all developed code for the project that are related to the MVC [13] architec-ture. It means that it contains the model classes, the controller classes, and the view templates for the application.
config
db
It contains the database schema and migration files for model classes and database entities. Even though that Rails is a full-stack framework for web application development, the application still needs to have a separate database to store the data needed by the application.
doc
This contains the documentation made for the application that is being developed.
lib
Code developed for the application that are not part of the MVC classes and code files.
log
Log files for the application. These are automati-cally created by Rails.
public
Contains the static files needed by the application. (i.e images)
script
Contains Rails scripts for different utilities needed by the application.
test
Folder to contain test code for the application. tmp
Files needed by the application that are related to web service.
vendor
Plugins installed in Rails that are being used by the application.
C. MVC[13]
One of Ruby on Rails main technical highlight is that the projects created follows the principle of Model-View-Controller design architecture in arranging the applications functionality. Model classes represents the object linked from an existing database and its business logic features in manipulating the data. View are the templates that are being rendered to be shown to the user depending what the user needs to see. Controller is the interface for the application users web browser, it handles requests between the browser, communicates with models to process the data needed, and renders the view templates and sends it back to the browser. The diagram below shows the simple interaction of a users web browser to a MVC system.
There are main components and libraries built-in on Rails to support and design the MVC architecture for the web application development: ActiveRecord library is to support Model classes in linking to database entities, ActionCon-troller module on ActionPack library is the base class for all controller objects for the project, and ActionView module on ActionPack library assists in developing the templates needed for different view.
Figure 1. A simple diagram showing how MVC architecture works, in context of Rails.
1) Model - ActiveRecord Library: To represent a Model layer in the project being created, Rails has a library called ActiveRecord to implement model classes and linking it to the web application database. ActiveRecord library and its concept is based on [14], a design concept created by Martin Fowler. The concept of ActiveRecord is that it first maps relational databases into object classes, which is called Object Relational Mapping [15]. The mapping is done due to the fact that relational tables are structured differently compared to object oriented classes. Typically a relational database table could be traced as an object class with the column description as attributes and each row is an object of the class. But with addition of foreign keys, disjoint, overlap, and other relational database table characteristics, the differences between relational database entities and object oriented is evident, thus it needs to be mapped or converted for object-oriented use of the system. Each relational database row and its attributes are encap-sulated within object classes. And then the class definition contains data access methods for the specific data in the database table. Also. it also contains other business logic processing methods to manipulate the attributes of the object and the linked data in the database if needed. This class that represents the data from the database is called a Model, and the relationship between Models are called Associations. Associations can define model hierarchy and association cardinality between models. ActiveRecord::Base is the base class for creating models and also for creating associations between models.
2) Controller - ActionController Module: Controller classes are the classes that handles the communication between the content of the application (View rendering and
Model data manipulation) and the request/response handling of Users web browser. Thus, only the Controller layer on the MVC architecture should know the methods that relates in browser requests and response. ActionController class under the Action Pack library in Rails represents the controller class that the application needs. Usually, each model (or each web page/view) should have its own controller class, and each active entity in the view that a user could interact that produces a request should have its own method inside the controller class. These methods are called action methods, which handles the process flow, or routing, within the system. The handling of action method routing could be either predefined or could be configured by the developer. The ancestor class for all ActionController class within the project is called ActionController::Base.
3) View-ActionView Module: The view layer handles the display structure that the user sees in using application in a given time. Based on our experiences using the web, we could all say that many website servers uses different layouts for different webpages of different purposes. It is the view layer that handles these different layout views depending on which aspect of the application is being viewed by the user. In Rails, it is the ActionView module inside the Action Pack library that handles the different views that the application could have. Views in Rails are usually templates composed of HTML [12] files and .erb (embedded ruby) [16] files. Given that this layer handles the template for views, this layer must not have any business logic methods inside it. D. Other Components or Libraries
Aside from the main ones discussed above that handles the core architecture of the project, there are also other components and libraries that Rails have for additional implementation of the designed application:
ActionDispatch
Part of the Action Pack library (that includes Ac-tionController and ActionView), ActionDispatch are a set of classes that handles web request routing and dispatch to applications.
ActionMailer
A component for email services development for the application being developed. It enables the ap-plication to send, process, and receive emails. The base class ActionMailer::Base are the parent class for mailer models in the system that are being used for the email functionality being implemented. ActiveModel
It is an interface between the Action Pack li-brary components and Object-Relational Mapping components (i.e. ActiveRecord). This enables the developer to have configuration control over the usage of other ORM frameworks if it is not desired to use ActiveRecord as the applications default ORM.
ActiveResource
It is a framework to link objects and RESTful [6] web services. It is similar to ActiveRecord, it does Object-Relational Mapping to model REST web services into objects.
ActiveSupport
Collection of utility classes for Rails usage. Could also be used for the development of the application. Railities
The core or the center of Rails code, which de-fines on how Rails functions as a framework for developing projects for web applications.
E. Tools to Aid Rails Development
As stated above, Ruby on Rails provides the classes and the framework needed by the developer to develop their desired web application. Aside from the framework, Rails also provide tools to aid development of the application, ranging from console tools up to automatic code generation tools that satisfies the philosophy of Rails development.
1) Rails Console: Rails console is an extension of Inter-active Ruby console (irb) [16] - the command-line console in Ruby to aid Ruby-based development. Similar to irb, Rails console is extended to aid developers of Rails application for setting up the system, for development, and for debugging. Command-line consoles aids in viewing the system state in a given system instance, and helps the developer to control the system in a more powerful manner compared to managing only the applications view interface in a web browser for further debugging.
2) WEBrick: WEBrick [17] is a package provided in Rails to provide aid in application development in terms of local hosting the project before the actual deployment. The application, before release, still needs to be hosted somewhere for its development and testing. WEBrick is local web server so that the application could be hosted for its further development by the developer. One feature of WEBrick is that changes applied to the project being hosted automatically updates the server, thus removing the time overhead spent for restarting the server for the developer to see the change in accessing the application in a web browser. 3) Code GenerationScripts and Migration Files: These are the components of Rails that helps the developer create the application project easier and faster. The generation scripts helps in generating the skeleton model and controller classes needed by the system. It also helps in creating unit tests for the classes being generated, and it also creates migration files that handles the recognition of the application to the database schema being used. Both code generation scripts and migration files helps by automatically generating code for the application when the user follows the default configuration of the system.
F. Deployment
After the development of the application, it needs to be deployed as a web service as a form of release for clients us-age. Ruby on Rails website [11] recommends some external tools to help the developer deploy their project to the internet community. One of the suggested tools in [11] is Phusion Passenger a.k.a. mod rails [18]. The deployment process of the web application developed relies on the specific tool being used. Adding additional information about each tools process for deployment is outside of the scope of this report. Please see [11] for available tools for Rails application deployment.
V. TUTORIAL
A. Setting up Ruby and Ruby on Rails
Setting up Rails is a little more work for those that are used to using PHP and having little to no set up required. However, this initial set up time is worth it. Time will quickly be made up for due to the speed at which a web application can be developed with Rails. The first step on the path to fast web development is installing Ruby.
For demonstration purposes, the version of Ruby we suggest is 1.8.7 p358, which can be downloaded free from http://rubyforge.org/frs/shownotes.php?release id=46588 for Windows. When prompted to integrate into PATH, yes should be checked for convenience. After the installer finishes RubyGems, a package manager, can be installed by typing gem update –system’.
Next, the Devkit should be installed from http://rubyinstaller.org/downloads. After extracting and navigating to the downloaded Devkit in command prompt, the ruby dk.rb init’ and ruby dk.rb install commands will finish the installation. What the Devkit does is install necessary gems for the next step: installing Rails.
With Ruby and the Devkit installed, running gem install rails at a command prompt will finally install Ruby on Rails! Now the environment is ready to create a new project (appli-cation). All that needs to be run is rails new project name; adding -d mysql will use a MySQL database which you will need to install separately. In addition to installing MySQL, you need to install a gem for it by running gem install mysql. MySQL installation is probably the hardest part of the process. After installing MySQL Server and Connectors from
http://dev.mysql.com/downloads/mirror.php?id=405845#mirrors, you must manually copy the LIBMYSQL.dll file, as rails and ruby will not do it for you. This file can be found at, for example,
C:\Program Files\MySQL\Connector C 6.0.2\ lib\opt
and must be placed in the
Ruby\bin
folder. Now youre ready to use Rails with MySQL. One of the few helpful commands to know while using Rails is rake. This is Rubys version of make (Ruby Make). It uses a type of makefile to run tasks and builds. One example is rake db:create which creates all of your databases for the application. Another helpful tool is bundle, a dependency manager. For example bundle install should install all the dependencies/gems that your application requires.
Now, you are ready to test your Rails installation. After creating a project, navigate to its root directory and run rails server. This will start up WEBrick, a simple ruby server, through which you can view your web application. Just navigate to localhost:3000 in your favourite web browser. The default welcome to rails page should show; just follow the instructions to get started making your first project! B. Learn to Math
First we want to create a project, open command prompt and type the command:
rails new MathProject -d mysql
Go into the new MathProject directory. As you can see this set up a lot of folders and files. Since this is a short tutorial, the folders you need to know about are apps, config and db. The apps folder contains your models, view and controller folders. The db folder has a migrate folder that contains the entities in your database. Finally the config folder has the file routes.rb which contains your routes -the links you use to redirect on your website.
We are going to use Nifty to auto-generate files for user authentication. First modify the Gemfile, uncomment the line:
gem ’bcrypt-ruby’, ’˜> 3.0.0’
(this is used for encryption), also add the line
gem "nifty-generators", :group => :development
Now run the command
bundle install
which will install nifty generators. Nifty generators is auto generation software which we will use to make our User.
Create the table using:
rails generate nifty:authentication rails generate nifty:layout
rake db:migrate
This will create a User entity in the database with an id, username, email, password, password hash, password salt, created at, and updated at columns. Users are authenticated using the BCrypt encryption gem.
It also creates a bunch of web pages and ruby files containing classes and functions to log in, check passwords, etc.
Check the file user.rb, if
require ’bcrypt’
isnt at the top of the file and
include BCrypt
isnt at the beginning of the User class, add them. When someone goes to our site we want them to go to the auto-generated file views/sessions/new.html.erb.
To do this well have to change the route inside con-fig/routes.db. Uncomment and modify the root route:
root :to => ’sessions#new’
Since this is going to be a math website, we want users to have a score for how many questions they got right. Find and modify the accessible attributes:
attr_accessible :username, :email,
:password, :password_confirmation, :score
Also add the score to create users.db
t.string :password_hash t.string :password_salt => t.integer :score
Drop the database and (inside command prompt) recreate it with
rake db:create rake db:migrate
Now the the database has been recreated with a score column.
Now we want to be able to add, update, and get our score. Add this to the User class inside user.rb.
def increase_Score() update_attributes(:score => score+1) end def decrease_Score() update_attributes(:score => score-1) end def get_Score return score end
In increase Score() and decrease Score() the up-date attributes() function upup-dates an attribute of User (in this case score) inside the database. Depending on whether the user gets the question right or wrong, their score increases or decreases by 1 respectively. The get Score() simply returns the score of the User.
Now we need to create a page for answering math questions. Create a folder called maths inside the view folder. Inside that folder create a file index.html.erb.
Put this following code inside the file:
<h1>Hello, Rails!</h1>
The variables rand1 and rand2 which are random numbers between 0 and 1000, ops is an array containing the operators for adding, subtracting, multiplying and dividing and randop is a random number between 0 and 3 to choose one of the operators.
<% rand1 = rand(1000) %> <% rand2 = rand(1000) %>
<% ops = [’+’, ’-’, ’/’, ’*’] %> <% randop = rand(4) %>
The next line simply shows the user what the math question is. Then the form begins with the random numbers and operators in the questions being put inside r1, r2, and op to be passed using GET when the user submits.
What is <%= rand1 %> <%= ops[randop] %> <%= rand2 %>?
<%= form_tag :r1 => rand1, :r2 => rand2, :op => randop do %>
This code allows the user to submit the form with their answer inside q.
<%= label_tag(:q, "Answer:") %> <%= text_field_tag(:q) %>
<%= submit_tag("GO!") %> <% end %>
Now we check to see if the users answer was correct. If they answered correctly then we find their id and increase their score, we also print out their new score. Else their score will decrease. <% if(params[:r1] != nil) %> <%@user = User.find(session[:user_id]) %> <% if(eval(params[:r1]+ops[params[:op].to_i] +params[:r2]) == params[:q].to_i) %> <%= "Correct!" %> <% @user.increase_Score() %> <% else %> <%= "Wrong Answer!" %> <% @user.decrease_Score() %> <% end %>
<%= "Your score is:" %> <%= @user.get_Score()%> <%end%>
To get access to this page we need a controller and to add a route inside routes.rb to access it.
To create the maths controller use the command rails generate controller maths
This will create a maths contoller.rb file inside app/controllers. Navigate to the file and modify it as follows
Once navigating to the webpage, there should be a login page displayed. This was all generated by nifty. Initially, there will be no users in the database. By clicking the register link, a new account can be created. Once you created an account youll be automatically logged in. If you look inside the MySQL Workbench youll see the new user account added. After creation, that user is now logged in. There is (obviously) no advanced error checking or logged-in checklogged-ing. Additionally, there is not a llogged-ink to the math page created earlier. However, by entering localhost:3000/math, this page can be viewed. Again, there is no error checking on this page, so navigating to it while not logged in will cause an error.
First try entering in the right answer, the score should be displayed with a value of 1 which can be checked with the score inside the database. Now when you test entering in the wrong answer you should see your score go down by one when this displayed in the website. Youll also see the same page in the database. You should be able to tell just how fast Ruby on Rails is after this tutorial, since most of the code was generated by Rails. The only major piece of user written code is the index page for the Maths view.
Once navigating to the webpage, there should be a login page displayed. This was all generated by nifty. Initially, there will be no users in the database. By clicking the register link, a new account can be created. Once you created an account youll be automatically logged in. If you look inside the MySQL Workbench youll see the new user account added. After creation, that user is now logged in. There is (obviously) no advanced error checking or logged-in checklogged-ing. Additionally, there is not a llogged-ink to the math page created earlier. However, by entering localhost:3000/math, this page can be viewed. Again, there is no error checking on this page, so navigating to it while not logged in will cause an error.
First try entering in the right answer, the score should be displayed with a value of 1 which can be checked with the score inside the database. Now when you test entering in the wrong answer you should see your score go down by one when this displayed in the website. Youll also see the same page in the database. You should be able to tell just how fast Ruby on Rails is after this tutorial, since most of the code was generated by Rails. The only major piece of user written code is the index page for the Maths view.
VI. NOTABLEAPPLICATIONS
One of the most notable applications of Ruby on Rails is Twitter. However due to Twitters explosive growth and Ruby on Rails problems of scalability, Twitter is switching
over to Java (Twitter has now moved its entire search stack from Ruby-on-Rails to Java. [19]).
While this one example might dissuade new programmers to use RoR because of its problems with scalability it is still a hotly debated topic. Many senior Rails developers say scalability isnt a problem with RoR (Dix, 2010). They say that the main problem for scalability is the database. By dividing up your system into services that access the data you can distribute the load [20] while using Ruby on Rails to hold all the services together.
There are some sites that managed to use Justin.tv while maintaining high speed. One example is Justin.tv a media streaming/ VOD website.
There are 5 ways that Justin.tv improved speed while using Rails [21]:
1) SQL - Decreased database querying times by finding out
• Which queries were slow, indexing queries • Refactoring slow queries
• Retrieve only the needed information from the database
2) C Libraries • Speed of C
• Better memory management then Ruby
3) Upgraded MemCache to latest version - which in-creased speeds by a factor of 3
4) Cache Expiration
• Changed expiry times of caches 5) Unicorn
6) GC Tuning 7) Regain Memory
• Less objects allocated
• Removed unused dependencies from Gemfiles • Removed old controllers/ views
After these improvements garbage collection sped up by 10%, response time decreased to 80ms, and over 50 thousand useless objects were saved.
This just shows that while Ruby on Rails might make it hard to scale big applications reliably, its certainly not impossible to improvise to improve the speed of your application.
According to [22] some other major websites that use Ruby on Rails- Groupon, GitHub, Justin.tv, and Hulu.
VII. RUBY ONRAILSCOMPARED
In the world of web development today, there is a wide variety of languages and frameworks available for use. This can make deciding what to use for a project more difficult. The following section will compare and contrast Ruby on Rails with more mature languages, as well as more modern, but less mature, frameworks that are arising in its wake.
A. PHP and Java
While on their own PHP and Java do not constitute a full stack framework like RoR does, they are both heavily used within web development due to their inherent flexibility. PHP and Java both allow, even require, extensive config-uration by the developer. This lends to their flexibility, but can also be a hinderance due to the amount of extra work required. RoR, however, highly discourages from modifying any of the pre-built configurations, promoting learning to work within those confines.[23]
Due to RoR’s relative immaturity, it has been criticized to be not as scalable as PHP and Java. On the other hand, by having a full stack framework available for use, it goes without question that a website can be developed far faster using RoR, where a single Rails developer can do the work of an entire team using Java.[24]
B. Django and Zend
Django and Zend, like RoR, are full-stack frameworks, designed to be easy to use and implement. The largest difference between the three is the language that they are based upon. Zend is built off of PHP and Django is based on Python, unlike Rails being built off of Ruby. Zend, being based on PHP, has held the value of flexibility despite the additional framework.[25] The Zend framework is utilized by many high profile companies, including Best Buy and Bank of America.
C. .NET MVC
.NET MVC is a very new development framework pro-duced by Microsoft, which was released in 2009. It is based off of the C# language which is very modern, having roots in both Java and C/C++. Like RoR, it follows the MVC design pattern.
While core functionality is very similar between RoR and .NET MVC, .NET MVC has been found to suffer from a relative lack of community support for both development support and plugins. This is mostly caused by its young age.
VIII. CONCLUSION
There are many advantages and disadvantages to using the Ruby on Rails framework. Deciding on whether or not to use Ruby on Rails for an application depends on the type of qualities the project requires. The initial set up does take a little more time than some of the alternative frameworks. By demonstrating the creation of a simple web application, we have hopefully given some insight in to the amount of work required to setup and create projects with Rails.
REFERENCES
[1] (2012, February) Ruby on rails. [Online]. Available: http://rubyonrails.org/
[2] (2012, February) Ruby. [Online]. Available: http://www.ruby-lang.org/en/
[3] (2012, February) 37signals: Web-based collaboration apps for small business. [Online]. Available: http://37signals.com/ [4] M. Slater. (2012, April) Understanding ruby on rails. [Online]. Available: http://www.buildingwebapps.com/articles/79188-understanding-ruby-on-rails
[5] (2012, February) Ruby on rails guides: Get-ting started with rails. [Online]. Available: http://guides.rubyonrails.org/getting started.html
[6] R. Fielding. (2012, February) Architectural styles and the design of network-based software architec-tures. [Online]. Available: http://www.ics.uci.edu/ field-ing/pubs/dissertation/top.htm
[7] R. on Rails Team. (2012, February) Ruby on rails. [Online]. Available: http://rubyonrails.org/
[8] ——. (2012, April) Ruby on rails documentation. [Online]. Available: http://api.rubyonrails.org/
[9] ——. (2012, 04) Ruby on rails guides: Getting started with rails. [Online]. Available: http://guides.rubyonrails.org/getting started.html
[10] T. Fisher,Ruby on RailsR Bible, 1st ed. Wiley Publishing Inc., October 2008, no. 67-74, 107-109, 147-149, 173-179. [11] R. on Rails Team. (2012, February) Ruby on rails: Deploy.
[Online]. Available: http://rubyonrails.org/deploy
[12] (2012, April) Rfc 1866 - hypertext markup language - 2.0. [Online]. Available: http://tools.ietf.org/html/rfc1866 [13] T. Reenskaug. (2012, February) Trygve/mvc. [Online].
Available: http://heim.ifi.uio.no/ trygver/themes/mvc/mvc-index.html
[14] M. Fowler. (2012, April) P of
eaa: Active record. [Online]. Available: http://www.martinfowler.com/eaaCatalog/activeRecord.html [15] Hibernate. (2012, April) What is object/relational
mapping? - jboss community. [Online]. Available: http://www.hibernate.org/about/orm
[16] R. P. L. Team. (2012, February) Ruby programming language. [Online]. Available: http://www.ruby-lang.org/en/
[17] Y. Santoso. (2012, April) Gnome’s
guide to webrick. [Online]. Available: http://microjet.ath.cx/webrickguide/html/html webrick.html [18] Phusion. (2012, April) Overview – phusion passenger(TM)
(a.k.a mod rails / mod rack). [Online]. Available: http://www.modrails.com/
[19] A. Williams. (2012, April) Once again, twit-ter drops ruby for java. [Online]. Avail-able: http://www.readwriteweb.com/cloud/2011/04/twitter-drops-ruby-for-java.php
[20] P. Dix, Service-Oriented Design with Ruby on Rails. Addison-Wesley Professional, 2010.
[21] (2012, April). [Online]. Available: http://www.slideshare.net/kwi/rails-performance-at-justintv-guillaume-luccisano
[22] Stuart. (2012, April) Top 50 ruby on rails websites. [Online]. Available: http://storecrowd.com/blog/top-50-ruby-on-rails-websites/
[23] B. A. Tate and C. Hibbs, Ruby on Rails Up and Running. O’Reilly Media, Inc., August 2006, no. 2.
[24] D. Geer, “Will software developers ride ruby on rails to success,”Computer, vol. 39, no. 2, p. 19, February 2006. [25] R. Allen, N. Lo, and S. Brown,Zend Framework in Action.