MVC versus WebForms [closed]

You shouldn’t arbitrarily decide between one or the other; don’t plump for the MVC framework just because it’s the new kid on the block and everyone’s singing its praises, especially not if you’re comfortable with doing things using Web Forms. Practically every existing system is going to be using the older, more established technology, and there’s nothing wrong with that.

While it’s true that the MVC framework does allow for even easier separation of concerns (after all, that’s what the MVC pattern is for), it also brings with it the responsibility of writing more HTML, and I think a slightly greater understanding of how the web works; not necessarily an unreasonable requirement, but you could argue it’ll slightly slow you down the first few times you set about using it.

To be honest, I agree that Web Forms takes a lot of undeserved flack. Granted, there’s a lot of magic going on in the background, and you get less control over some of the HTML output, but it’s not exactly impossible to style with CSS (you end up using !important a lot, perhaps), and it’s also not impossible to get some separation of concerns, even if it doesn’t meet the purist’s view of what that might be. You can still write pretty horrible code using the MVC framework. If you’re looking to throw together something quickly, and you’re good with Web Forms, then you’re going to be able to achieve that very quickly, and it’s nothing to be ashamed of, is it?

That’s not to say, of course, that you should stick to your guns and ignore MVC either; it’s a good framework (in fact, it’s a very good framework) and it does confer several benefits which you might want to take advantage of in the long run. You also have to remember that it doesn’t automatically nullify everything you learned about ASP.NET 2.0, either; a lot of the supporting architecture is embraced in the MVC framework, including things like the membership providers.

Leave a Comment