
These three elements of MVC can be summarized like this;
Model – Model objects are the parts of the application that implement the logic for the application’s data domain.
View – Views are the components that display the application’s user interface (UI).
Controller – Controllers are the components that handle user interaction, work with the model, and select a view to render the user interface. In ASP.NET MVC 3, a controller has the suffix “Controller” in each file name. For example, the controller which manages the Accounts will be AccountController.
If you have MVC installed in Visual Studio 2010, you will be able to Select a MVC 3 Application under the Web Template. Once you give a name and the location to be settled in the project another windows will pop-up asking the sort of application need to be created. They are Empty, Internet and Intranet.
Intranet Application is an application that would work with Windows Authentication. Once you are logged into your Windows System under a particular domain, you will not be asked to log into the system again. ASP.NET uses the credentials that you provided to log into Windows as the credentials needed for the system.
Internet Application is like most of the applications we see in today’s contest that we do need to use a Forms-based Authentication mechanism to log into the system. The application has already set up the UI and the required model for the application to facilitate the Forms-based Authentication.
Empty Application is as it’s means will not be available with no special authentication mechanism defined in it. The developer will have to decide and write the code behind to facilitate the authentication.
The Content Folder holds the static resources that will be used to create the application such like Style-sheets, Images and etc… Controllers folder keeps all the Controller components of MVC that will be used through out the application. Models folder stores the model items such as Data Access Objects. Simply, the Model components of MVC. Javascripts including JQuerry libraries and other sorts of scripts used throughout the application are stored in the Scripts folder. Views folder stores the View components of MVC, in ASP.NET MVC, there is another subfolder inside the Views folder for each and every controller in its name. For example, the AccountController will be having a folder named Account inside the Views folder. All the views that are accessed through AccountController are located inside the Accounts folder. Shared sub folder inside the Views folder contains the shared resources.
Lets discuss about each element of the MVC in depth in next articles.