View is one of the key parts of ASP. net mvc applications. It separates the focus on the page display effect from the application logic. It is undeniable that the view should be the entire ASP. net MVC project development process is the most time-consuming part, because the display logic-related technology is varied, you may want to learn more about HTML, CSS, JavaScript, Dom, jquery, JSON, Ajax, and so on. Of course, not only these, but you do not need to be fully proficient, because different technologies may be used in different display environments.
First, let's talk about the responsibility of the view. The view is responsible for converting the data transmitted by the Controller Into the output format required by the client, all the code that appears in the view should only end with "rendering data" and should not be used for other purposes. Therefore, complex application code logic or business logic should not appear in the view.
When developing ASP. net mvc, we often have a saying: "The model should be heavy, the Controller should be light, and the view should be stupid ". ASP. net MVC does not want to judge too many view-independent technologies when developing a view. Therefore, it is necessary to keep the view logic as simple as possible during development, so do not let the view take too many responsibilities.
Knowledge Point 2-3: View Introduction