ASP.NET MVC Architecture (tutorialsteacher.com)
讓客戶滿意是我們工作的目標(biāo),不斷超越客戶的期望值來自于我們對(duì)這個(gè)行業(yè)的熱愛。我們立志把好的技術(shù)通過有效、簡單的方式提供給客戶,將通過不懈努力成為客戶在信息化領(lǐng)域值得信任、有價(jià)值的長期合作伙伴,公司提供的服務(wù)項(xiàng)目有:域名與空間、虛擬主機(jī)、營銷軟件、網(wǎng)站建設(shè)、城固網(wǎng)站維護(hù)、網(wǎng)站推廣。Model: Model represents the shape of the data. A class in C# is used to describe a model. Model objects store data retrieved from the database.
Model represents the data.
View: View in MVC is a user interface. View display model data to the user and also enables them to modify them. View in ASP.NET MVC is HTML, CSS, and some special syntax (Razor syntax) that makes it easy to communicate with the model and the controller.
Viewis the User Interface.
Controller: The controller handles the user request. Typically, the user uses the view and raises an HTTP request, which will be handled by the controller. The controller processes the request and returns the appropriate view as a response.
Controlleris the request handler.
The following figure illustrates the interaction between Model, View, and Controller.
MVC Architecture
The following figure illustrates the flow of the user's request in ASP.NET MVC.
Request Flow in MVC Architecture
As per the above figure, when a user enters a URL in the browser, it goes to the webserver and routed to a controller. A controller executes related view and models for that request and create the response and sends it back to the browser.