ASP.NET Webforms vs. ASP.NET MVC

I’ve been reading some blog posts with guys trying to say which is better, and what a developer should know with ASP.NET etc…

1. Any ASP.NET developer who thinks he would need to learn both (ie let’s say a consultant)  – should always expand and learn the technology at hand.  Most often we tend to become experts in what we work with everyday. 

2. I have my own opinion of which one I like better – but the fact is , there are different strokes for different folks.  Many are working on projects where Webforms were and have been the primary ASP.NET technology for awhile.  The staff is educated on it, knows it’s pros and cons and works through them.  They have an investment in it. 

In my persona experience, the control that the ASP.NET MVC has for the developer, being ‘less abstract’ is appealing.  I find I have to fight the abstraction that ASP.NET Webforms brings (ie. the idea of ‘state’ – but it is stateless).

I do know that the next version of Webforms continues to expand and get better – so there are obviously pros and cons to both.

Again, personally I love what MS has done with ASP.NET MVC and I was able to quickly build rich UI and testable interfaces with it.  It is more of what I see out there in the rest of the web development world.  Webforms are very proprietary to MS and unique.  It has an event-driven/viewstate model.

In the end, it’s the difference between a ‘Front controller’ architecture vs. a ‘Page controller’ architecture.  The MVC model is a proven architecture as well, and I find it a bit more intuitive than attempting to use a MVP setup with webforms.

In my experience I’ve seen shops put way too much logic in the code behind – not separate out the layer appropriately.  Obviously the same can be done in MVC with too much logic in the page or controller.  (I prefer a service layer in both setups).

So in the end, regardless of the technology, how you architect it and apply rules to your development team (ie. minimize code in the code behind of a page) is what is really the issue in my opinion  🙂


One thought on “ASP.NET Webforms vs. ASP.NET MVC

  1. Pretty much sums it up: both have the pros and cons. I work on a project that uses WebForms and passive views (MVP) and another that uses MVC. Every day I see something new or something I like better in each.

    One thing I have noticed, is that I bring more from the MVC to the WebForms (MVP) side than vice versa. Most likely because MVC is a much newer platform and I am still trying to grasp what all is available to me.

    Another thing is that WebForms without some sort of MV pattern is the devil…

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s