M-V-C Think of it as:
"Order Details (including Customer & Employee info)", "HTML/ASP Form (to display the OrderDetails)" and "Order details service class (having methods to SaveOrderDetails, GetOrderDetails etc.).
The Model (Data Class e.g. OrderDetails)
- The data you want to Display
The Controller (Service class)
- Knows about the Model (Order Details)
- Has methods to manage the Model
- And as such can be unit tested Its Single Responsibility is to manage the OrderDetails CRUD operations.
- It knows NOTHING about the View
The View (ASP Page)
- Displays the Model (OrderDetail's ViewData).
- It has to know about the Model's structure so it can correctly display the data to the users on screen.
- The View's structure (style, layout, HTML etc., locale) can be changed at anytime without it changing anything in the application's functionality.
- And as such, many Views can display the same Model in many different ways.
- In multi-tenant web applications, Customer specific Views can be stored in a database table and displayed based on Customer information