ASP.NET MVC:mvc pattern

发布时间:2021-08-02 23:36 来源:https://blog.51cto.com/u_15309 阅读:151 作者:mb60f7b7dab5c54 栏目: 云计算 欢迎投稿:712375056

The controller—The coordinator that provides the link between the view and themodel. The controller is responsible for processing input, acting upon themodel, and deciding on what actionshould be performed, such as renderinga view or redirecting to another page.Continuing the blog example, the controllermight look up the most recentcomments for a post (the model) andpass them to the view for rendering.

 

ASP.NET MVC:mvc pattern

The view—The visual representation of a model, given some context. It’s usuallthe resulting markup that the framework renders to the browser, such as theHTML representing the blog post.

There are three pieces to the MVC pattern:

The model—The domain that your software is built around. If you were buildinga blog, your models might be post and comment. In some contexts, the term modelmight refer to a view-specific model—a representation of the domain for thespecific purpose of being displayed in the user interface.

免责声明:本站发布的内容(图片、视频和文字)以原创、来自本网站内容采集于网络互联网转载等其它媒体和分享为主,内容观点不代表本网站立场,如侵犯了原作者的版权,请告知一经查实,将立刻删除涉嫌侵权内容,联系我们QQ:712375056,同时欢迎投稿传递力量。