Introduction
I would like to share the basics of MVC design patterns. I have collected the following contents from various web resources and tried to summarize them in my words.
Understanding MVC with Relationship diagram

What is a Model?
- The MVC model is basically a C# or VB.NET class
- A model is accessible by both controller and view
- A model can be used to pass data from a controller to a view
- A Model is considered to be smart and handles the business rules, logic and data and will be independent of other parts of MVC (controller and view).
What is a View?
- A View is an ASPX page without a code behind file
- A view is considered to be dumb and is an output representation of the model data
- A view knows only about the model.
What is a Controller?
- A Controller is basically a C# or VB.NET class that inherits system.mvc.controller
- A Controller is the heart of the entire MVC architecture
- Inside the Controller's class, action methods can be implemented that are responsible for responding to browser or calling views.
- A Controller can access and use a model class to pass data to views
- A Controller uses ViewData to pass any data to the view
- A Controller receives and dispatches the request; in short, it handles the user interaction and input logic. It knows about both the Model and View.
Difference between ASP.NET Web form and MVC
| Page controller pattern | MVC |
| Typical page life cycle | No page life cycle |
| Viewstate | No Viewstate |
| Slow due to maintaining the state of controls in hidden fields | Fast |
| Testing is difficult | Testing is easy |
| Need to create Arch for business logic | No need to create arch, the business logic is already separated into different folders |
| No concepts of actions | We can reuse the actions at the controller |
| Large page size due to viewstate | Small page size due to no viewstate concept |
| Each page attached with its code behind | View and controller are not dependent each other |
| Good for small applications | Good for big applications |
| Postbacks occurs | No postbacks |


Join the conversation! Your thoughts help the community grow.