• English
  • Русский
  • Українська
 

Development in Ruby on Rails

Development in Ruby on Rails

Ruby on Rails (RoR) is a framework written in the Ruby programming language that implements the Model — View-Controller architectural template for web applications, and also provides their integration with a web server and a database server. It is open source software and is distributed under the MIT license.

Created by David Heinemeyer Hansson based on his work at 37signals on the Basecamp project management tool and released in July 2004. On December 23, 2008, the Merb project team teamed up with the Rails team to create the next version of Rails 3, which will combine the best features of both frameworks.

It is based on the following principles of application development:

maximum use of reuse mechanisms that minimize code duplication in applications (the principle of Don’t repeat yourself);
by default, configuration conventions are used that are typical for most applications (the Convention over configuration principle) — an explicit configuration specification is required only in non-standard cases.

Architecture

Schematic representation of the model-view-controller architecture with additional components
The main components of Ruby on Rails applications are the model, the view, and the controller. Ruby on Rails uses a REST-style of building web applications.

The model provides the rest of the application components with an object-oriented display of data (such as a product catalog or a list of orders). Model objects can load and save data in a relational database, and also implement business logic.

Rails 3 uses the ActiveRecord library to store model objects in a relational DBMS by default. A competing analog is DataMapper. There are plugins for working with non-relational databases, for example, Mongoid for working with MongoDB.

The view creates a user interface using the data received from the controller. The view also passes user requests for data manipulation to the controller (as a rule, the view does not directly change the model).

In Ruby on Rails, the view is described using templates of ERB HTML files with additional inclusions of Ruby code fragments (Embedded Ruby, or ERb). The output generated by the embedded Ruby code is included in the template text, after which the resulting HTML page is returned to the user. In addition to ERB, it is possible to use about 20 more template engines, including Haml.

A controller in Rails is a set of logic that is triggered after the server receives an HTTP request. The controller is responsible for calling the methods of the model and starts the formation of the view.

The correspondence of the Internet address with the controller action (route) is set in the config/routes.rb file.

The controller in Ruby on Rails is a class inherited from ActionController::Base for classic applications and ActionController:: API for API[4]. The open methods of the controller are the so-called actions. Actions often correspond to a separate view. For example, at the request of the admin/index user, the index method of the AdminController class will be called and then the index.html.erb view from the views/admin directory will be used.

Stages of cooperation

Do you have an idea
Do you have an idea
If you have an idea for creating a business on the Internet, come to us. Our managers will listen carefully and understand what and how to do to achieve the goal
We offer implementation options
We offer implementation options
Based on your idea and our experience, we offer you possible options for the implementation of your project
We select developers
We select developers
After approving the project version, we select all the necessary developers for its implementation
Creating a phased implementation project
Creating a phased implementation project
We create a step-by-step plan for the implementation of your project. We plan the time, distribute the roles of the project participants. The most commonly used project management system is Redmine
Developing
Developing
After the approval of the project implementation plan, our developers begin to implement it
We manage the development process
We manage the development process
Your project manager manages the implementation of your project at every stage. Monitors the task completion time, quality, manages risks, reports to you
Testing
Testing
At each stage of implementation, we test your project for performance on the part of users and administrators
We give it to the clerk
We give it to the clerk
After our testers have completed the final testing of your project, we will transfer the project to you
We support
We support
After the completion of the project, we stay in touch, we will always help to improve your project, finalize and support it