The Model-View-Controller (MVC) architectural pattern separates an application into three main components: the model, the view, and the controller. The ASP.NET MVC framework provides an alternative to the ASP.NET Web Forms pattern for creating Web applications. The ASP.NET MVC framework is a lightweight, highly testable presentation framework that (as with Web Forms-based applications) is integrated with existing ASP.NET features, such as master pages and membership-based authentication. The MVC framework is defined in the System.Web.Mvc assembly.
MVC is a standard design pattern that many developers are familiar with. Some types of Web applications will benefit from the MVC framework. Others will continue to use the traditional ASP.NET application pattern that is based on Web Forms and post backs. Other types of Web applications will 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 implement the logic for the application's data domain. Often, model objects retrieve and store model state in a database. For example, a Product object might retrieve information from a database, operate on it, and then write updated information back to a Products table in a SQL Server database.
In small applications, the model is often a conceptual separation instead of a physical one. For example, if the application only reads a dataset and sends it to the view, the application does not have a physical model layer and associated classes. In that case, the dataset takes on the role of a model object.
Views: - Views are the components that display the application's user interface (UI). Typically, this UI is created from the model data. An example would be an edit view of a Products table that displays text boxes, drop-down lists, and check boxes based on the current state of a Product object.
Controllers: - Controllers are the components that handle user interaction, work with the model, and ultimately select a view to render that displays UI. In an
ASP.NET MVC Applications, the view only displays information; the controller handles and responds to user input and interaction. For example, the controller handles query-string values, and passes these values to the model, which in turn might use these values to query the database.
Benefits of MVC Architectures
1. You can get full control on your rendered html code of your website.
2. MVC provides you clean separation for concerns (SoC).
3. You can enable TDD means test driven development with the help of ASP.NET MVC framework.
4. Also you can easily integration your java script code with this MVC framework.
5. You can make design your web application using web2.0 standard.
6. Generate your web application URL as pre SEO guidelines so you can easily promote your web application on Major search engine.
7. Here you can don’t worries about any View State and Post Back Events.
8. But as per my The main advantage of ASP.net Web Form are is it provides you RAD development and developers got easy models for win form applications.
9. Finally using MVC frameworks .net developers can develop scalable web application
Loading...