Why I Prefer the MVC/Model 2 Style over WebForms

The prosecution rests its case.  Are you seriously going to try to tell me again that WebForms is simpler?

About Jeremy Miller

Jeremy is the Chief Software Architect at Dovetail Software, the coolest ISV in Austin. Jeremy began his IT career writing "Shadow IT" applications to automate his engineering documentation, then wandered into software development because it looked like more fun. Jeremy is the author of the open source StructureMap tool for Dependency Injection with .Net, StoryTeller for supercharged acceptance testing in .Net, and one of the principal developers behind FubuMVC. Jeremy's thoughts on all things software can be found at The Shade Tree Developer at http://codebetter.com/jeremymiller.
This entry was posted in Uncategorized. Bookmark the permalink. Follow any comments here with the RSS feed for this post.
  • Astorm

    Not sure if I should post this here but I have an architecture issue that I need some feedback with. I am using the MVP pattern in our WinForms application, it is working out well as we begin but I am wondering if I can get some input from you all on object management. I believe that I am loading too many large objects up front as my memory usage grows quite rapidly is there a pattern or something less formal that others have used to load objects in a more JIT technique so the GUI stays responsive but not over bloated.

  • alwink

    I started out as a self-taught programmer using WinForms. Which I could do successfully with the help of google etc. It wasn’t great, but I got it working.

    Then I tried to make a website with WebForms. No amount of googling could save me, I even read a freaking book about it! I tried very hard but never understood how to make a working web site. Suffice to say that the resulting website was a complete disaster. Even PHP is easier and more understandable.

    Then I found MonoRail, and all my problems were solved. Without books or extensive 1000page documentation, it just clicked. Sure, there were some bumps on the road, but nothing that a bit of googling or asking on the user group couldn’t solve. I could finally make a usable web site using .NET, web development started to make sense.

  • http://blechie.com/WPierce/archive/2008/01/30/Is-WebForms-Right-for-You.aspx Bill Pierce

    More source material for the prosecution.

  • lazy d

    i don’t know of anyone who actually uses the drag and drop of webforms. if they do go to the design surface it is typically trying to get some user control to register.

  • http://www.highoncoding.com Mohammad Azam

    For a person programing in WebForms forever I find WebForms simple. MVC is a great framework but I would not start bashing out on WebForms. I love both the frameworks and I both of them have a place of their own.

  • Phillip

    Ok, so MVC in PHP is great. MVC in Ruby is great.

    The ASP.Net MVC Framework is a pile of shit. End of story. It guts me that over the past 6-10 months all the RSS feeds im subscribed to are cluttered with this crap.

  • Steve Sheldon

    Has anyone put together a definitive list of the ASP.NET MVC page cycle?

  • http://thomaseyde.blogspot.com/ Thomas Eyde

    @Jeremy Blosser

    IMO it’s true that the general developer doesn’t need to know the life cycle, until those strange behavioral bugs start to show up.

  • http://hackingon.net Liam McLennan

    If you want to do something non-trivial then sooner or later you need to understand how your web framework works. That is when webforms becomes a 29 step nightmare.

  • Kevin

    My big problem with web forms is that I can’t “think” in web forms, but using MVC everything is so easy and clear.

    With web forms, I know how to get to my destination, but can’t drive the car. Using MVC I not only know how to get to my destination, but can drive the car there and I get a manual transmission to boot.

    I quit working with ASP.NET a couple of years because I didn’t enjoy working with web forms — actually I hated it. The new MVC framework is finally letting me get back to ASP.NET.

  • http://blog.danielfernandes.net Daniel Fernandes

    @Jeremy

    To be honest, it’s possible that if ASP.Net MVC was providing hooks to all steps in its internal processing that you would end up with something similar to the mess in Webforms. Granted Webforms just feels, and rightly so, more of an impediment than anything else at times.

    Daniel

  • Nelak

    I’ve been thinking about using ASP.NET MVC with WebForms but with the ViewState disabled. The idea is to be able to use ease webpage development. I would like to hear your thoughts on this idea. Thank you :)

  • http://www.chadmoran.com Chad Moran

    It may be hard for you to understand since you understand how HTTP and stateless web apps work. But for those that may not really understand how to make an application where state isn’t shared from page to page it’s just difficult to wrap their heads around it. I think saying what is simpler is again, in the eyes of the beholder. MVC frameworks may be simpler for you, but WebForms may be simpler to someone else.

  • Jeremy Blosser

    I dunno. Looks like a straw man argument to me.

    I’d wager that 90% of web forms developer don’t know and don’t need to know the event lifecycle. They are all draggy-droppy and move on to the next task.

    Yeah, the pages are craptastic, but saying that they NEED to know the WebForms event lifecycle is completely untrue.

  • http://codebetter.com/blogs/jeremy.miller Jeremy D. Miller

    @Chad Moran,

    I’m pretty sure that if a person is capable of understanding the WebForms event lifecycle then they’re very likely to be able to deal with the extremely simple world of Html. And quantum physics and string theory and differential equations and who knows what else.

  • http://www.chadmoran.com Chad Moran

    I think the claim of simplicity lies in the developer. Mainly because some users were brought up in the “drag and drop,” methodology of developing an applications. This mainly comes from WinForms devs.

    From one who doesn’t understand the nuts and bolts of HTTP and how websites work creating a stateless app is blasphemy and adds a layer of complexity previous ASP.NET WebForms developers didn’t have to worry about.