Monday, January 04, 2010 -
It’s Javier Lozano’s fault – he sent me to http//webformsmvp.com where I read this:
ASP.NET MVC might be the new kid on the block, but there are still a host of compelling advantages to ASP.NET Web Forms.
The ASP.NET Web Forms MVP project is about bringing the love back to Web Forms through a renewed approach to using it - an approach that facilitates separation of concerns and testability whilst maintaining the rapid development that Web Forms was built to deliver.
First thought: sounds great! Yes of course there are advantages to WebForms – massive audience, familiarity, huge component set, lots of books/help/docs… but “bringing the love back”? Was there “love lost”? Oh – yah I spose there was. Well OK so I’ll stand up and say that I’m a proponent of ASP.NET MVC – no surprise there.
Whatever – I’ve been involved in so many pseudo-discussions about “WebForms vs. MVC” that I’m beginning to think people are doing the Spolsky thing and taking the other side just for the fun of it. Which is entirely disrespectful of me, and given that the guys who wrote the above site and framework are MVPs and don’t seem to be overtly joking (which they may be… who the hell knows any more…) – well I told them I’d write a post on my thoughts.
Here it is.
The first thing that caught me was the assumption of greater “productivity”:
Comparing ASP.NET WebForms to ASP.NET MVC is really a question of tradeoff between productivity and control
At first I rewound the video as I didn’t believe he actually said it – so I listened again and indeed, these are the words. OK – well, I can see how someone who maybe tried a demo or gave a new thing a go and didn’t along with it well could think “this is a major pain” and feel like it’s not very productive.
But what does “productive” mean anyway? That’s where it hit me – what is it you’re producing? HTML? Pages built by data? Well hellz yah you can’t get past the speed of an Object DataSource bound to SQL Server, spit out onto a grid. If I use the author’s video for clues, here’s a small followup:
ASP.NET WebForms… provides us with the ability to quickly and easily compose applications using re-usable components with minimal code, thus providing a high level of productivity
Dammit. Damn damn damn. Part of me is absolutely convinced I’m being baited here. The other part of me has watched the video, gone to the author’s web site and read his posts… Look I don’t want to come off this way – I know how it reads. Seriously. I’m not a pig-headed prick who thinks he’s always right (well … not most of the time… honestly).
BUT.
Haven’t we moved beyond this debate? I have no problem discussing the differences of WebForms/MVC and suggesting people stay with what they know, but at least be informed about it!
Either way – hook in mouth, let’s do this… I think the only point worth addressing here is the assertion of “productive”. Control vs. Productivity seems to be a core issue with many webforms developers (and that’s the whole reason I wrote this post) so let’ focus on that.
So here’s the deal: we’re re-defining “Productive”. The industry is changing and growing. ASP.NET has been pulled by the teeth into the modern day and ASP.NET MVC is a reflection of that change. Change sucks sometimes and people will create reasons and platforms to get out of the way of its relentless march. Yet here it comes – waiting behind the wall… it comes…
Productive no longer means “Component-slinging” or “here’s the app sir can I go home now”. If you’re lucky maybe it does – if that’s the case I doubt you’ve read this far :).
Productive doesn’t mean “Yay look here’s an editable Grid”.
Productive means you can prove your code works through means other than F5.
Productive means “look I created it according to industry standards – my HTML renders in most browsers and I’ve compressed my javascript files and made sure my image tags have “alt” attributes for accessibility.
Productive means I’ve triple-checked XSS/CSRF vulnerabilities and I think we’re covered.
Productive means being a professional and embracing the fact that we, as Microsoft developers, have (generally) been behind the curve when it comes to the cool stuff you can do on the web – and working to overcome this for ourselves and our clients.
Productive means that we are able to look out at what’s happening beyond the Big Wall and understand that other frameworks have figured a lot of stuff out – specifically the need for Separation of Concerns and DRY, the need for standards compliance and the need for embracing semantic markup.
Productive means we understand the web is a stateless medium, built on the back of HTTP, TCP/IP, and HTML. And we get it – more than just acronyms.
Productive means we don’t run from javascript because it’s “ugly”. We embrace it as a way to kick ass with our application.
Productive means that we deliver quality code, not code as quality.
People feel jilted by the <asp:cheese runat=server> being moved to a MVC setup. I understand that. I’m not unsympathetic – Microsoft is pushing out new technology constantly and it can be more than a little irritating trying to keep up. The thing is that the switch to ASP.NET MVC is less an “innovative” move and more of a “course correction” or “adjustment”.
It would be good if we could try to focus on working together on these things – with either platform. Inventing a 3rd just seems silly.