the controller. </li></li></ul><li><ul><li>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 SQL Server</li></li></ul><li><ul><li>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 Products object.</li></ul>In ASP.NET the view is the set of web pages presented by a web application.<br />
<ul><li>Controllers The controller is the object that allows the manipulation of the view. Usually many applications implement Model-Controller tiers that contain the business logic along with the necessary code to manipulate a user interface. In an ASP.NET application the controller is implicitly represented by the code-behind or the server side code that generates the HTML presented to the user.</li></li></ul><li>A basic diagram that would help us understand the specific parts that implement the MVC architecture in an ASP.NET application is presented below: <br />
ASP .NET MVC project specific directory architecture<br /><ul><li>App_Data is the physical store for data.
Content folder keeps files such as scripts, CSS, images and so on.
Controllers folder is the location for controllers. The MVC requires the names of all controller to end with Controller.
Models stores classes that handle application business logic.
Scripts is the folder for script files. By default, it contains AJAX script files and the JQuery library.
Views is the recommended location for views. It my contain .aspx, .ascx, .master and other files that are related to rendering views.</li></li></ul><li>Advantages of an MVC-Based Web Application<br /><ul><li>It makes it easier to manage complexity by dividing an application into the model, the view, and the controller.
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.
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.</li></li></ul><li>Advantages of an MVC-Based Web Application<br /><ul><li>It provides better support for test-driven development (TDD).</li></ul>TDD is an evolutionary approach to development which combines test-first development where you write a test before you write just enough production code to fulfill that test and refactoring.<br /><ul><li>It works well for Web applications that are supported by large teams of developers and Web designers who need a high degree of control over the application behavior</li></li></ul><li>Possible problems with ASP .NET MVC<br />Problems may appear when testing the application. Especially the GUI and the code-behind classes in a page controller based model, is very difficult to test because the only way to test something like a button click's code-behind event handler is to click the button itself! This means that if we put more and more code in code-behind classes (which inevitably becomes the case in large web applications with lots of UI controls), we will not be able to run unit tests on the UI code. <br />
Possible problems with ASP .NET MVC<br />So the only way to test the application would be to manually test the GUI. The page controller based design does not support unit testing, and we would not be able to use automated unit testing tools such as NUnit, MBUnit and so on (which we can easily use to test the other layers such as BLL and DAL).<br />