ASP.NET - what is mvc - Asked By aman on 17-Feb-12 01:37 AM

hi all,
 what is asp.net mvc2

how does it works.....

how to create a simple example of asp.net mvc2

thanks,
Suchit shah replied to aman on 17-Feb-12 06:21 AM

The MVC pattern has been heralded by many developers as a useful pattern for the reuse of object code and a pattern that allows them to significantly reduce the time it takes to develop applications with user interfaces.

The model-view-controller pattern proposes three main components or objects to be used in software development:

A Model , which represents the underlying, logical structure of data in a software application and the high-level class associated with it. This object model does not contain any information about the user interface.
A View , which is a collection of classes representing the elements in the user interface (all of the things the user can see and respond to on the screen, such as buttons, display boxes, and so forth)
A Controller , which represents the classes connecting the model and the view, and is used to communicate between classes in the model and view.


The ASP.NET MVC framework offers the following advantages:

1) It makes it easier to manage complexity by dividing an application into the model, the view, and the controller.
2) It does not use view state or server-based forms. This makes the MVC framework ideal for developers who want full control over the behavior of an application.
3) It uses a Front Controller pattern that processes Web application requests through a single controller. This enables you to design an application that supports a rich routing infrastructure.
4) It provides better support for test-driven development (TDD).
5) It works well for Web applications that are supported by large teams of developers and for Web designers who need a high degree of control over the application behavior.