The Future of ASP.NET Web Forms

by admin 17. April 2012 23:00

Web Forms - MVC ChoicesI've been working with ASP.NET Web Forms for nine years now and have acquired a comfortable familiarity with its strengths and weaknesses. We've all seen the growing popularity of ASP.NET MVC over recent years and the most common reaction is to want to play with it but when it comes time to making the switch, we often experience the "don't move my cheese" syndrome. Now that I'm finally leaning towards MVC, I'm faced with the fact that it would not be a practical option for the company I work with. I do outside work and will somehow have to find enough breathing space to move over and ramp up.

What were once the strengths of Web Forms are now clearly it's weaknesses and can not be sustained in the rich, interactive, Ajax-enabled environment we operate in today; think RAD and ViewState. This richness brings with it a level of complexity for even the most mundane of applications, and an even more compelling reason for formal testing; think more complex client-server life-cycles, asynchronous requests and you get the idea. Our stateless HTTP protocol is being dragged kicking and screaming into this error-prone battlefield and it's only going to get more complex over time. Maybe in five years, there will be a move back to the server and we'll start the whole cycle again! However, in a jungle such as this, the ViewState becomes too difficult to manage, not to mention a performance killer with an increasing payload. In addition, the page life-cycle abstraction is totally removed from the reality of a normal request/response transaction in our stateless HTTP world. Web Forms stand as proof that we can become a slave to a framework.

 

The ASP.NET Stack

 

There is no right time to make such a big paradigm switch as moving from event-driven Web Forms to the close-to-the-metal MVC architecture; the best option is often just to pick a small project and jump right in. On a personal level, it behooves me to start planning now for my learning curve and the difficulty of maintaining two different approaches to programming going forward. What is, is.

Microsoft are now talking of "One ASP.NET" where we can mix and match among the different project templates. If you wanted MVC4 scaffolding in an Web Forms site, there is nothing stop you from doing it. Scott Hanselman even alludes to it in his blog post "One ASP.NET Sneak Peek: Elegant Web Forms and Snowballs in Hell". Honestly, I think that would be the biggest architectural screw up since the Spruce Goose tried to fly. Can you imagine a novice programmer five years from now trying to get his head around a mish mash of an application like this? Some things are not good just because they're new; for example the spaghetti hell of the razor syntax. Who in their right minds would go back to mixing code with markup - lunacy, yet idiots are doing it and worse still, Microsoft are promoting it.

Microsoft are continuing to support and invest in ASP.NET Web Forms, at least that is the corporate sound bite. For years now, my take on it has been that they would make some gestural investment in it in the form of trivial new features but basically let it die it's own death. Don't get me wrong, it will be around for a long time to come and has it's place. But Microsoft does not want a repeat of the fiasco they found themselves in when they deprecated the Web Forms project template for the release of VS 2005. The outcry from developers was such that they had to endure the public embarassment of scrambling to do a 180-degree turn with the SP1 release to re-introduce it.

For me the biggest selling point for Web Forms is how productive it makes me. For the vast majority of projects I work on, it is still the best fit. Each of these approaches to Web development have their place. The trick is being honest enough with yourself when trying to make a rational decision. I see Web Forms largely out of the picture within the 3/5 year range and I am planning accordingly. They may still exist but people won't be choosing to work with them. Would you choose Cobol for your next business application? I thought so...



Oxite - The Autopsy

by agrace 20. December 2008 09:09

Nerd Bitch Yeah, I know, the title is controversial, but then again, so is Oxite. Ditto for MVC. Remember the hype about Java? Here we go again... just because there is a need to improve our development process in the shape of some practical test-driven way, does not mean that the first thing we come up with is going to provide the answer to everyone. No RAD shop was ever going to be able to adopt text book TDD, and the same goes for MVC. No-brainer.

There has been a huge whole in the market over the last few years for a small to medium-sized CMS tool. With all the hype surrounding ASP.NET MVC right now - just look at the amount of attention devoted to MVC right now on the ASP.NET home page - the announcement on CodePlex of a new ASP.NET MVC CMS system was sure to arouse huge interest. The unfortunate mention of the word "Microsoft" in the blurb has resulted in an unbelievable amount of venom in the blogosphere directed at the developers of Oxite. Despite this post's title, I'm not going to perform an in-depth autopsy on Oxite. The guys who developed this have done what a lot us haven't: they have given openly to the community and the pony-tails have come out bitching as usual. There's probably less bitchiness in the world of fashion design than in the world of open source :-O

One of the more constuctive pieces of feedback I have seen came from Rob Connery, who actually pitched in and offered to help. Instead of slamming the people trying to contribute, he offered constructive advice on how to make it better. Kudos. Karl Seguin, was a little more heavy handed in his critique and that sparked off some interesting feedback in the comments section. FYI, I'm not criticizing Karl whose blog is one of my favorites. The reason I'm not, is because I often jump in there and say stuff in the heat of the moment which inevitably lands me in it. My mouth and by extension, my fingers, have always been a few steps ahead of discretion.

Sobriety Checkpoint Long before ASP.NET MVC came out I had been watching Microsoft stagger inch by inch like a drunken man reaching for the whiskey bottle, in the direction of both the open source community and open standards in general. It's like, at some point, a light went on at Redmond: "Jaysus, maybe we should start paying attention to these open source dudes with the pony tails." Developers were moving away from Microsoft despite the superiority of the framework, the languages and the tools. I remember several years ago meeting one of the Microsoft managers at a Microsoft event in SF, and having a general conversation about Microsoft's tools - this was before Web Express - and I remarked that since Java was then the de facto language in colleges and that the IDE was free, that Microsoft would be out of the development business within five years if it didn't wake up. I can still see his face. Priceless.

This is all old hat news at this stage, but we all know the Microsoft has accepted that it has to conform to standards and has to move in the direction of the larger developer community. No longer will the tail wag the dog. Maybe the arrival of Ray Ozzie provided the required impetus, who knows. The move to an MVC version of ASP.NET was a marketing master-stroke but one that may come back to bite Microsoft on its ass if the hype exceeds the promise.

As for Oxite, I'm sure that it will mature into something very useful. There is still a need for a free ASP.NET Web Forms version of a CMS system and hopefully something like that will appear soon. In the meantime, this is the Season of Giving. As a community, we should all think bigger, dream bigger and maybe come up with new means of collaboration and "what if" scenarios for the future. Community online think tanks? Maybe bring in professionals from some of the other verticals such as doctors... develop something meaningful rather than more mental masturbation in the shape of software tools to build more software tools? Just thinking out loud and drinking too much espresso :-)

kick it on DotNetKicks.com

Tags:

ASP.NET