I just finished listening to a DotNetRocks podcast today with Paul Sheriff which largely talked about creating mobile web sites using ASP.NET WebForms.
During the show they discuss when you might use WebForms vs MVC and pointed out that WebForms still have their place, particularly in the corporate world, since they are just as testable as MVC and yet much easier to get something up and running quickly. This is in contrast to a public facing site that might need to be as light weight as possible and therefore need the extra control that MVC can give you.
And then there is the issue of legacy code. As they mentioned in the podcast, just because Microsoft has introduced a new technology, doesn’t mean we all have to go re-implement our websites in that technology the next day. It doesn’t even mean we have to ever implement that technology. It is just another option in our toolbox. It is our job as developers and architects to know when the right time to use what technology is based on the requirements of the application and the skill set of our development team.
The War Is Over
The point I want to make today is this. The war is over already. I am surprised that this is still a conversation that the community is having. Both sides have “lost” to a sneak attack by SPAs. If this is still a conversation you think is worth having, I would suggest that you may be behind the learning curve. The .NET world has moved on.
That is, client side models and frameworks have taken over. What you use to produce the HTML that all lives in, is of very minor concern at best.
- Find Your School
- Participating Products
- The “UPC Lookup” tab on the Participating Products page above
- Much of the Signup logic on the LabelsForEducation web site
You would be surprised at how very little code is in the codebehind files of my ASCX files that each of my modules live in.
In my current project, I’m using EXTjs and ExtDirect, which is based on WebAPI, to create SPAs. Nothing that I am currently doing requires that I do the work in either WebForms or MVC.
The beauty of an SPA is that it never officially post back so it doesn’t matter what you are using to hold the main application.
Drawbacks to SPAs
And what if your page has no interactive components? Or just a part of the page has some interactive components? Maybe the bulk of the content comes from a database. In that case, you can use either and neither would necessarily be “bad.”
What About Database Driven Static Sites?
Other Places Talking About WebForms vs MVC
Other post in ASP.NET MVC
- ASP.NET MVC - Model != BLL or DAL - February 11th, 2009
- Infinite 302 Loop - How would you even know? - March 11th, 2009
- ASP.NET MVC - Controller to View - October 30th, 2013
- WebForms vs MVC–The War Is Over - September 25th, 2014
- ASP.NET, Angular.js & html5mode - September 24th, 2015
- Using Node.js and Gulp with ASP.NET in Visual Studio 2015 - January 21st, 2016