Sunday, September 30, 2012

Scenario of processing an MVC request

The simple scenario of processing an MVC request is described in the following steps:
  1. The user enters in the browser some URL that is sent to the server, e.g., http://localhost/Product/List.
  2. The user request is analyzed by the framework in order to determine what controller should be called.
  3. The Controller takes the parameters that the user has sent, calls the model to fetch some data, and loads the model object that should be displayed.
  4. The Controller passes the model object to the view.
  5. The View gets data from the model, puts it into the HTML template, and sends the response back to the user browser.
  6. The browser shows the HTML that is received from the server.