sanket.khandare@gmail.com

ASP.NET MVC – Simplified

Feel My Words ..

ASP.NET MVC – Simplified

We as a company working on ASP.NET MVC from long time, and considering lot of benefits we decided to move on ASP.NET MVC for all future / upcoming projects. This is certainly great move but difficult to digest to some of our legacy developers.

While asking question, why? most common answer came to me as

MVC is difficult to understand for legacy web developers… Really??

This is not just issue with our guys, even while taking interviews lot of people not really able to explain what is MVC and why it is required.

Is it really complicated? No, it is not! Here is quick guidance.

The ASP.NET MVC is a web application framework developed by Microsoft, which implements the model–view–controller (MVC) pattern.

The Model is the part of the application that handles the logic for the application data.
Often model objects retrieve data (and store data) from a database.

The View is the parts of the application that handles the display of the data.
Most often the views are created from the model data.

The Controller is the part of the application that handles user interaction.
Typically controllers read data from a view, control user input, and send input data to the model.

How MVC Works

ASP.NET MVC

  1. User makes the request for some resource in server (by putting some URL in the browser).
  2. Request comes to controller first (routing engine is the one who is responsible for deciding which request will be handled by which controller. In this article we won’t talk in depth about this behavior).
  3. Controller if required talk to model for data.
  4. Model operates on database (or on some other data sources) and return data (in form of business objects) to controller.
  5. Controller chooses the appropriate view (like say Customer view which will may contain some html tables, drop downs, textboxes…).
  6. Controller passes the data (model data retrieved in step 4) to chosen view(in step 5), where data will be populated as per convenience.
  7. Controller sends back view to the user.

Below is nice video which I found over youtube

There is lot to know, but hope this gives basic idea about ASP.NET MVC

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.