can any one explain the difference between the mvc and web application in asp.net. in mvc we can find controllers folder. cant we able to find controllers folder in web application..! please vanish my confusion.
An ASP.NET MVC application is an application which depends upon the ASP.NET MVC Framework. MVC stands for Model, View Controller, the three components which define an application created using the MVC pattern.
The MVC pattern aims to seperate an applications logic, data and presentation into distinct, somewhat independent components.
Models are a representation of an application's data. For example a shopping application might have a Cart model to represent the state of a user's shopping cart.
A view is a visual representation of the data contained in the model. A view class should knoow the specifics of how the model(s) it uses should be presented.
The Controller's job is to handle user input and update the state of the Model to reflect the changes that were made as a result of user action. For example imagine the user is viewing a Contact Us page and clicks the Submit button. The controller would respond to the button click by updating the model with values from the form fields and then save the model, causing it to be validated and then written to the database.
This is a very shallow and incomplete explaination of the MVC pattern you should head over to the ASP.NET MVC homepage to get a more complete view of the MVC pattern and the ASP.NET MVC framework.
An ASP.NET Web Application uses a separate framework known as Web Forms. Because Web Forms does not use the conventions defined in the MVC pattern, the Web Application template does not create a similar folder structure .
The use of either framework is not mutually exclusive, the two represent differing approaches to the same problem. With respect to which is most efficient for data access I would refere you to Michael Shimmins' excellent comment
MVC uses controllers to orchestrate the models and views to provide user interfaces to the user.
Web forms doesn't use controllers to achieve this, it uses code behind with events.
MVC is built around the notion of separation of concerns - each thing is responsible for its own bit, and shouldn't be concerned with what other bits are doing. Webforms has them a bit more mushed together, where code sits associated 1:1 with the webform (in the code behind), often leading to business logic creeping into the UI.
WebForms uses a powerful eventing system to help abstract away some of the complexities of HTTP, such as its stateless nature. MVC doesn't do this, which requires the developer to work within the confines of a pure HTTP environment. The eventing system in WebForms lets you quickly wire up events in a familiar way if you've come from a VB6/WinForms background (which the target audience had when ASP.NET was first released).
Have a look at http://www.asp.net/mvc which has a lot of great tutorials on getting started with MVC.