How are Model views and controllers related?

Answer Posted / abhi2810

MVC is a pattern for the architecture of a software
application. It separates an application into the following
three components:

* models, for handling data and business logic
* controllers, for handling the user interface and
application logic
* views, for handling graphical user interface objects
and presentation logic

This separation results in user requests being processed as
follows:

1. The browser, on the client, sends a request for a page
to the controller on the server.

2. The controller retrieves the data it needs from the
model in order to respond to the request.

3. The controller renders the page and sends it to the view.

4. The view sends the page back to the client for the
browser to display.

Is This Answer Correct ?    21 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of load in ruby?

658


Is ruby on rails dying?

640


What are the functions performed by rails migration?

652


what is the purpose of RJs in Rails?

717


what is Rails Active Record in Ruby on Rails?

717


how can we define Ruby regular expressions?

632


what are benefits of using active record as opposed to raw sql queries?

640


Explain about restful architecture?

622


List out the few features of Ruby?

682


What is bundler?

661


what is the use of super function in ruby on rails?

679


Which command is used to create a migration?

662


Explain me what is the purpose of rjs in rails?

643


Please explain what are the positive aspects of rails?

635


What do you understand by rails?

662