Welcome to AspAdvice Sign in | Join | Help

ASP.NET Model View Controller Architecture

A little while ago, Scotts Guthrie and Hanselman presented on MVC in ASP.NET (and Dynamic Languages) at the oddly named ALT.NET conference in Texas.  I'm with ScottH that "Alt" is a pretty silly name and something like Agile or Pragmatic would be a much better descriptor.  Alternative is not terribly descriptive since anything that differs from the norm is alternative, and not necessarily better.  It reminds me of how all music sought to be "alternative" regardless of its actual style just to earn cool points.  And nevermind that calling something alt.net and not actually owning that domain name is just asinine.  Incidentally, you can find the conference's actual domain at http://altnetconf.com.

As regards the conference, ScottH was good enough to record ScottGu and his own sessions, which he's made available for direct download (from Microsoft no less):

Scott Guthrie on MVC (about 70 minutes)

Scott Hanselman on DLR and MVC (about 30 minutes)

If you're an ASP.NET developer, you should definitely watch at least ScottGu's presentation, as this is a technique that you'll want to be familiar with when it ships, probably in Spring 2008.  I don't know that a huge number of shops will run out and adopt this approach the day it ships, but you can bet you'll see a lot more using these techniques once Microsoft has an officially supported framework than are currently doing so.

If you're unfamiliar with the whole Model-View-Controller (MVC) pattern, watching the video is a great way to see it in action.  The short version, in my own words, is that this pattern allows a great deal of "separation of concerns" which make up any individual web request.  The typical codebehind model used in ASP.NET has a lot of tight coupling - between the URL and the physical location of the ASPX file, between the HTML emitted and the logic used to validate and display it, between the data and the controls on the page, etc.  This makes it difficult to unit test individual components of ASP.NET pages today (though a number of frameworks are available that help with this today).  By separating the handling of the URL from the display of the results from the binding of data from the web context, MVC makes it much easier to test each of these pieces in isolation, even allowing for Test Driven Development, in which the tests are written before the code.  This is very exciting to followers of Agile methodologies, as it can result in much higher quality code.  It is, however, a very different way of architecting web applications from the typical ASP.NET ASPX-postback-centric page paradigm, so it will take some getting used to and it will take some time for tools to become available that fit this new approach.  I'm definitely excited by it, though, and hope to start using this approach for some projects of mine once bits are made available.

Published Tuesday, October 16, 2007 11:16 AM by ssmith

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# Modeling » ASP.NET Model View Controller Architecture

Tuesday, October 16, 2007 12:59 PM by Modeling » ASP.NET Model View Controller Architecture

# re: ASP.NET Model View Controller Architecture

it is very encouraging and helpful if any body by taking a small example explain the coding of controller class ...please do it as soon as possible....dont publish theory ,publish theory with small example...

Friday, July 25, 2008 6:26 AM by mohan

# re: ASP.NET Model View Controller Architecture

theory will be published by many ,explaining with little example is good for ur site ....even any one can search in google and publish theory...try something different dude...

Friday, July 25, 2008 6:31 AM by mohan

# Model Cruise Ships

My next and final point to the first question is early childhood development and environmental circumstances of children. Although I have no scientific evidence, I believe a child’ s athletic ability is highly correlated with events in infancy and from

Wednesday, April 08, 2009 1:04 AM by Model Cruise Ships

Leave a Comment

(required) 
required 
(required) 
Enter the code you see below