Binary Artist

The Jason Marshall Experience

Binary Artist

Jason Marshall
E-mail me Send mail

Recent comments

Authors

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010

APS.NET MVC (Part 1) The Model, View and Controller

 

And so it begins.  My epic journey into the Microsoft Model View Controller.  This is not new technology,  other languages (see Ruby on rails) have used this model for a while,  and now Microsoft has adopted it in the new ASP.NET 4.0 Frame work.

  • Model: The model contains the core information for an application. This includes the data and validation rules as well as data access and aggregation logic.
  • View: The view encapsulates the presentation of the application, and in ASP.NET this is typically the HTML markup.
  • Controller: The controller contains the control-flow logic. It interacts with the Model and Views to control the flow of information and execution of the application.  A controller should contain only logic related to application flow control.
  • Browser sends a request Controller. 
    The Controller the processes the URL request. 
    Control is then sent to the Model, asks the model for information probably from a database.
    Once the Model has finished it's work it sends control back to the Controller. 
    The Controller can then go back to the Model if it needs to, doing as much work as it needs before it finally renders the View.
    The view is contructed using the data passed from the Model by the controller back to the User.


    Tags: ,
    Categories: MVC
    Posted by Admin on Thursday, May 20, 2010 10:10 AM
    Permalink | Comments (0) | Post RSSRSS comment feed
    Free Hit Counters
    page counter