Ruby on Rails - rails tutorial - Ruby on Rails MVC - ruby on rails tutorial - rails guides - rails tutorial - ruby rails
What is Ruby on Rails MVC?
- The Model View Controller principle divides the work of an application into three separate but closely cooperative subsystems.

It basically works as following:
- Requests first come to the controller, controller finds an appropriate view and interacts with model which in turn interacts with database and send response to controller.
- Then controller gives the output to the view based on the response.

Learn ruby - ruby tutorial - learn ruby tutorial - model controller architecture in ruby rails mvc - ruby example - ruby examples - ruby programs

Step 1 - Browser request for ruby on rails web application :

ruby on rails tutorial tags - ruby , rail , ruby on rails , rail forum , ruby on rails tutorial , ruby tutorial , rails guides , rails tutorial , learn ruby
Step 2 - Browser request to the server for ruby on rails web application :

ruby on rails tutorial tags - ruby , rail , ruby on rails , rail forum , ruby on rails tutorial , ruby tutorial , rails guides , rails tutorial , learn ruby
Step 3 - Web request to the server for ruby on rails redirected to MVC :

Step 4 - Web request in ruby on rails web application
-> redirected to controller in mvc :

ruby on rails tutorial tags - ruby , rail , ruby on rails , rail forum , ruby on rails tutorial , ruby tutorial , rails guides , rails tutorial , learn ruby
Step 5 - Web request in ruby on rails web application
-> redirected from controller
->to model in mvc :

Step 6 - Web request in ruby on rails web application
-> redirected from controller
-> to model
-> Access database in mvc :

Step 7 - Web request in ruby on rails web application
-> redirected from controller
-> to model
-> Access database
->Access active records in the database in mvc :

ruby on rails tutorial tags - ruby , rail , ruby on rails , rail forum , ruby on rails tutorial , ruby tutorial , rails guides , rails tutorial , learn ruby
Step 8 - Web request in ruby on rails web application
-> redirected from controller
-> to model
-> Access database
->Access active records in the database -fetch active records and control back to controller in mvc :

Step 9 - Web request in ruby on rails web application
-> redirected from controller
-> to model
-> Access database
->Access active records in the database -fetch active records and control back to controller in mvc -> Feed data into HTML through Embedded Ruby:

Step 10 - Web request in ruby on rails web application
-> redirected from controller
-> to model
-> Access database
->Access active records in the database
-fetch active records and control back to controller in mvc
-> Feed data into HTML through Embedded Ruby
-> Data displayed as haml :

Step 11 - Web request in ruby on rails web application
-> redirected from controller
-> to model
-> Access database
->Access active records in the database
-fetch active records and control back to controller in mvc
-> Feed data into HTML through Embedded Ruby
-> Data displayed as haml
-> Data displayed as HTML and displayed in the browser :

