As I hinted in earlier articles in this series, to overcome the deficiencies of the ASP.NET Web Forms solution, Microsoft created an alternative to Web Forms—the ASP.NET MVC framework. In the MVC framework, a whole web application is separated into three components: the model, view, and controller. We will take a close look at this approach in this article, the third part of a four-part series.
Introducing the ASP.NET MVC framework
Typically, the model component maintains state by persisting data in a database, while the view component is selected by the controller and renders the appropriate UI. By default, the ASP.NET MVC framework utilizes the existing ASP.NET page (.aspx), master page (.master), and user control (.ascx) for rendering to the browser.
The center and most important controller component takes the responsibility of locating the appropriate action method in the controller, obtaining data to use as the action method's arguments, and handling any errors that might occur when the action method runs. Then, the controller renders the requested view. Figure 1 gives a rough perspective of the way ASP.NET MVC works.
Read More..
No comments:
Post a Comment