views:

285

answers:

4

We are going to develop a website in ASP.NET. So is it better to use MVC or web forms.

+6  A: 

It depends on what kind of site you want to build and your knowledge and experience creating websites.

If you know your stuff and are confident in your ability to work "close to the metal" (as it were) I would imagine that you could build a faster website using ASP.NET MVC since you would be able to optimize your site to have as little overhead as possible. However it is more than possible to build a very fast site using standard ASP.NET as well so it really depends on exactly on the requirements of your project.

Andrew Hare
+1 exactly what I was going to say, just better put. Though I doubt that anyone is going to claim a huge performance boost on either platform.
Jay
+2  A: 

My completely unscientific opinion: Yes; ASP.NET MVC is faster than web forms.

ASP.NET MVC gives screen pops on the order of 1 to 2 seconds. Web forms is more like 3 to 5 seconds.

I don't know if they switched to ASP.NET MVC when they did the lightweight version of the MSDN library, but the speed improvement is similar to what I described. And let me tell you, the usability improvement is like night and day.

YMMV

Robert Harvey
The fact that you can get away with lightweight requests (especially if doing lots of Ajax requests) when you might otherwise find yourself passing around potentially hundreds of kilobytes of ViewState is one testament to this unscientifc opinion!
Funka
I see that Robert already noted this in another comment on this page already!
Funka
+1  A: 

Web Forms and MVC each have their strengths. Web Forms typically has the familiar code-behind style of coding where you hook up a handler for something like a button click and write the code to handle it. MVC has a more separations of concerns style of coding and is generally more unit testable.

It all depends on your coding preferences and time required to deliver the project with respect to learning curves.

I would imagine this question has been answered a million times on this site an many other blogs.

Brian Behm
+2  A: 

Personally, I don't think there are big performance gap between asp.net mvc and web form. Because they actually employ the same underlying engine. In most cases, what makes performance a problem is how developers write their code, and the structure of the application. Usually, people tend to compare mvc and web form on the elegance, maintainability. http://weblogs.asp.net/shijuvarghese/archive/2008/07/09/asp-net-mvc-vs-asp-net-web-form.aspx

Raymond
Web forms has the additional overhead of view state, among other things.
Robert Harvey
exactly, i almost forgot about that "evil".
Raymond