Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the difference between the asp.net mvc application and asp.net web application

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.

like image 576
Mihir Avatar asked Dec 22 '22 18:12

Mihir


1 Answers

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.

like image 189
Michael Shimmins Avatar answered May 17 '23 23:05

Michael Shimmins