Biggest advantage to using ASP.Net MVC vs web forms

The main advantages of ASP.net MVC are

1) Enables the full control over the rendered HTML.

2) Provides clean separation of concerns(SoC).

3) Enables Test Driven Development (TDD).

4) Easy integration with JavaScript frameworks.

5) Following the design of stateless nature of the web.

6) RESTful urls that enables SEO.

7) No ViewState and PostBack events

The main advantage of ASP.net Web Form are

1) It provides RAD development

2) Easy development model for developers those coming from winform development.

Regarding SoC, people can mess up with it just like they use to on webforms, by writing "fat" controllers with lots of business logic or even data access code in it. So I would say SoC is something that must be provided by the coder, the fw can't help. – rodbv Dec 12 at 15:22

@ rodbv: Very true, but MVC does sort of push you in the right direction, or at least doesn't make you jump through hoops to do so. So maybe that point should read something like 'makes SoC easier to implement' – Erik van Brakel Jan 25 at 23:21


MVC is much easier to test
MVC has better separation of responsibilities
MVC is much easier to create very complex websites with a minimum of code

Web forms are very easy to slap together
Web forms hide away complexity from the developer in web controls
Web forms use the same mental model of development that windows forms use


Biggest single advantage for me would be the clear-cut separation between your Model, View, and Controller layers. It helps promote good design from the start.

Web forms also gain from greater maturity and support from third party control providers like Telerik.

In webforms you could also render almost whole html by hand, except few tags like viewstate, eventvalidation and similar, which can be removed with PageAdapters. Nobody force you to use GridView or some other server side control that has bad html rendering output.

I would say that biggest advantage of MVC is SPEED!

Next is forced separation of concern. But it doesn't forbid you to put whole BL and DAL logic inside Controller/Action! It's just separation of view, which can be done also in webforms (MVP pattern for example). A lot of things that people mentions for mvc can be done in webforms, but with some additional effort.
Main difference is that request comes to controller, not view, and those two layers are separated, not connected via partial class like in webforms (aspx + code behind)

Do you mean development speed or execution speed? – julesjacobs Jan 25 at 23:42
Obviously execution speed. – Andrei Rinea Aug 14 at 11:52

If you're working with other developers, such as PHP or JSP (and i'm guessing rails) - you're going to have a much easier time converting or collaborating on pages because you wont have all this ASP.NET events everywhere.

You don't feel bad about using 'non post-back controls' anymore - and figuring how to smush them into a traditional asp.net environment.

This means that modern (free to use) javascript controls such this or this or this can all be used without that trying to fit a round peg in a square hole feel.

MVC lets you have more than one form on a page, A small feature I know but it is handy!

Also the MVC pattern I feel make the code easier to maintain, esp. when you revisiting it after a few months.

ASP.NET Webforms lets you have as many forms on a page as you want. The limitation is that only one can have "runat="server" attribute. – Andrei Rinea Aug 14 at 11:53

My 2 cents:

ASP.net forms is great for Rapid application Development and adding business value quickly. I still use it for most intranet applications.
MVC is great for Search Engine Optimization as you control the URL and the HTML to a greater extent
MVC generally produces a much leaner page - no viewstate and cleaner HTML = quick loading times
MVC easy to cache portions of the page. -MVC is fun to write :- personal opinion ;-)


http://stackoverflow.com/questions/102558/biggest-advantage-to-using-asp-net-mvc-vs-web-forms

search this blog (most likely not here)