the basic process of ruby on rails

10
Ruby on Rails Create powerful content management systems

Upload: alberto-lamana

Post on 16-Jul-2015

68 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: The basic process of Ruby on Rails

Ruby on Rails

Create powerful content management systems

Page 2: The basic process of Ruby on Rails

Introduction

Ruby on Rails is a web application framework

Reasons to work with it: It is free There is a big community of developers It has a fast learning curve It is very very powerful It is flexible and can easily

accommodate to our needs

Page 3: The basic process of Ruby on Rails

In this presentation we are going to zero in on the process. We want to understand what happens from the moment the user makes a request via URI to the response of the web server.

Work flow

Page 4: The basic process of Ruby on Rails

URI

A user makes a request to a server via Internet through the protocol TCP/IP.

http://myapp.com/task/new

User Internet

ServerA DNS server in Internet identifies the server as the target of that domain

Page 5: The basic process of Ruby on Rails

Routes

The route 'task/new' gets at the server. Rails identifies the route and directs it to the controller.

task/new Routes Controller task

Page 6: The basic process of Ruby on Rails

Action

Once the controller has been identified, there are a number of actions that can take place. In our case we are looking for the action new

task/new Routes Controller task

Action show

Page 7: The basic process of Ruby on Rails

Data base

The controller will gather the necessary data to be able to handle the request.

task/new Routes Controller task

Action show

Data base

Controller

Routes

Page 8: The basic process of Ruby on Rails

Views

Now that the controller has collected the data it needs it will deliver it onto the view for rendering.

task/new Routes Controller task

Action show

Data base

Controller

Routes

RoutesView for the show action

Page 9: The basic process of Ruby on Rails

Return to the user

Finally the web server delivers to the user the html generated by the view.

task/new Routes Controller task

Action show

Data base

Controller

Routes

RoutesView for the show actionInternet

Page 10: The basic process of Ruby on Rails

Thanks. I hope it was helpful.

Feel free to improve it and share it.

Alberto Lamana