Today someone asked me what my opinion on webforms are or were, and sometimes I feel like the proverbial deer that gets caught with the light in his eyes. It probably seemed like I knew nothing about web forms, which is not entirely true. I mean I did a lot of my first ASP.NET programming with web forms, and its a really great platform for several reasons. Firstly you can develop a working demo of something in really short order, you don’t have to really go out and code a user control from scratch, because the controls that are already there are pretty good. I mean the Gridview/Datagrid control is pretty cool and it is pretty customizable. Secondly ASP.NET does a good job of taking HTTP from the stateless protocol it is, to a model that maintains state quite well. I coded a lot with ASP.NET Webforms and its not a bad technology or platform to work with.
In the same breath, however, I have been working with SOAP calls and web services for the last 8 to 9 months and what I like the most about this approach is the freedom to totally control the markup that is rendered in the browser. With web forms you had to deal with something called ViewState which could in some scenarios make a mess of your code. I like clean HTML. What the SOAP/Webservice model also kinda reinforces is that HTTP is stateless and should be treated as such.
I have also been doing some ASP.NET MVC and I personally like it, a lot, and will continue developing a bit more with it. There is a clean and clear separation between your presentation logic and your business logic and there is no viewstate.
Maybe I need to do some more webforms for a bit to get to grips with it again, maybe not. I do prefer spending time learning C# language features actually.