Useful information about ASP.NET MVC architectures
Advertisement
The model-view-controller (MVC) architectural pattern separates an application into three main components: the model, view, and the controller. The ASP.NET MVC framework offers an alternative for the ASP.NET Web Forms pattern for creating Web applications. The ASP.NET MVC framework is a lightweight, highly testable presentation framework that is integrated with existing ASP (such as in Web Forms-based applications).NET features such as master pages and authentication-based membership. The MVC framework is defined in the system.Web.MVC Assembly.
MVC is a standard design pattern that know many developers. Some types of Web applications take advantage of the MVC framework. Others still use the traditional ASP.NET application model based on Web forms, and post back. Other types of Web applications to combine the two approaches; Neither approach excludes the other.
The MVC framework includes the following components: Models:-. Model objects are the parts of the application that implements the logic for the application domain data. Often, model objects to retrieve and save state in a database model. For example, could a product object to retrieve information from a database, work on it and then updated information back to a table in a SQL database write.
In small applications, the model is often a conceptual separation instead of a physical. For example, if the application reads only a DataSet and it sends to the view, the application of a physical model level and its associated classes No. In this case, the role of a model object takes the DataSet.
Views: views are the components that the application’s user interface (UI) displayed. Typically, this user interface from the model data is created. An example would be an editing view of a table, the check box based on the current status of a product object, displays a drop-down lists and text boxes.
Controller: controllers are the components, user interaction handle, working with the model, and select a view ultimately rendered that displays the user interface. In an ASP.NET MVC applications, the view displays only information; the controller handles and responds to user input and interaction. For example, the controller of query string values is treated, and passes those values to the model, which in turn use these values to query the database.