MVC framework

Mar 6, 2008 at 7:52 AM
Hi all,
I always read about the new MVC framework , is it a replacement candidate to the WCSF or an addition.

Mar 6, 2008 at 3:03 PM
The ASP.NET MVC Framework is an alternative to ASP.NET Webforms.

If you are using the WCSF mainly for the benefits of:

  • Better separation of concerns via Model-View-Presenter
  • Better testability of the Presentation Layer
  • Dependency Injection

I think you will find the MVC Framework + Unity a very compelling alternative to the WCSF when they are released. The MVC Framework was built with separation of concerns and testability in mind, and offers hooks specifically to help with dependency injection.

However, and this is the kicker, the MVC Framework does not support ASP.NET Server Controls ( at least not for two-way binding ) and the Postback Model. Therefore, if you leverage a lot of 3rd party UI controls that use the postback model, viewstate, etc., they won't work in the MVC Framework. Depending on your development needs this could be a big deal breaker right now.

The WCSF also provides a number of other controls and services that you might miss when using the MVC Framework, like all the cool new AJAX Bundles, module discovery services, sitemap services, security enhancements, etc.

Unless you are experiencing some pain with ASP.NET Webforms, I think the combination of WCSF and ASP.NET Webforms is awesome, extremely productive, and still maintains support for the wonderful 3rd party UI controls we have known for quite some time.

I do recommend playing with the ASP.NET MVC Framework on the side to better understand the MVC Presentation-Layer Pattern as it compares to Model-View-Presenter. It is hard not to enjoy the simplicity and extensibility of the framework.

I created a couple of screencasts that might be helpful:

Unity Dependency Injection IoC Screencast

Day Of Patterns & Practices Screencast - WCSF AJAX DynamicData ASP.NET MVC Framework

Hope this helps,



David Hayden
Microsoft MVP C#

Mar 6, 2008 at 4:47 PM
Chris Tavares and I have been keeping an eye on the MVC framework. Both of us participated in design meetings with the MVC team, and Chris has contributed to the project directly with some quickstarts (I believe).
To keep things simple, I'll quote from Chris's article in MSDN magazine (March 2008 Vol 23 #4), page 52:
"What's happening to Web Forms? Is MVC replacing it?"  
The answer is no.  Web Forms is a well-understood technology, and Microsoft will continue to support and enhance it.

So, both frameworks are here to stay, will be actively supported, and fit slightly different needs (as David mentions above). There are pros and cons to both frameworks, and you will need to decide which will best suit your needs.

This is a space where customers are asking for input, help, and guidance. So, at some point (hopefully not too far out) patterns & practices will probably have some guidance around MVC. (and no, there is not currently an active project in this area).

Michael Puleio - patterns & practices