Geeks With Blogs
David Williams Who's scruffy looking?

Someone asked me the other day, between Standard ASP.Net and ASP.Net MVC, which do I prefer and why.  Although I have long been an ASP.Net developer, I have to say that I easily would choose MVC over standard ASP.net any day (and twice on Sunday).   I feel this for the following reasons:

  • Separation of interests: The three sections of MVC are logically separated: Model(Data), View(.aspx page), Controller (Code that feeds data to view). 
  • NO VIEWSTATE:  If you are new to MVC, you think this is a bad thing, but it is actually very, very good.
  • Performance: Because there is no viewstate, there is no decoding/encoding of viewstate, no unneeded data passed back and forth to the browser.
  • MVC is more AJAX/JavaScript friendly.  For example:  No more funky control names like ‘ctl00_pagebody_ucSetupList_gvSetups_ctl02_hlSetupName’.
  • Easier to test.  Separation of interests allows you to test the controller methods directly.
  • No events.  Like ViewState, if you are new to MVC, you think this is bad.  Actually this too is very very good.
  • Did I say NO VIEWSTATE?  Yes, but it bears repeating.

Personally I am in love with MVC and no longer enjoy working on any of my legacy ‘standard’ ASP.Net sites.

Posted on Thursday, October 14, 2010 6:19 PM | Back to top


Comments on this post: Asp.net MVC everyday and twice on Sunday.

# re: Asp.net MVC everyday and twice on Sunday.
Requesting Gravatar...
I agree with every point although certain old web apps I have worked on would be quite tricky to port to MVC at the moment, building a recursive tree with collapisble panels each having several buttons has been a challenge, good fun but a challenge.

Going back to webforms feels dirty.
Left by Gregor Suttie on Oct 15, 2010 2:57 AM

Your comment:
 (will show your gravatar)


Copyright © David Williams | Powered by: GeeksWithBlogs.net