DNN Blog

Dec 5

Posted by: Charles Nurse
12/5/2008  RssIcon

This article is cross-posted from my personal blog.

With the imminent release of version 1.0 of the ASP.NET MVC Framework, does this mean we should now all be learning MVC as the “old” Web Forms model will be replaced?

The answer is a resounding NO.

The Web is a stateless platform.  With the introduction of ASP.NET over 5 years ago, Microsoft provided a “stateful” programming model, so that developers who were familiar with “stateful” systems likes Windows Forms would feel comfortable, and wouldn’t have to learn something completely different to work on Web Applications.

This model has proven to be very successful as demonstrated by the number of ASP.NET sites and by the number of companies providing ASP.NET Controls which are built on Web Forms.

Enter ASP.NET MVC.

Now we have a new paradigm for Web development, one that does not attempt to build a “stateful” wrapper around a stateless platform. 

However, it does solve two big issues with the WebForms approach.  First is that Web Forms are not very easy to Unit Test as the model is tightly bound to a Web context.  Second, designers have little control over the rendered HTML from the controls used.

ASP.NET MVC addresses both of these needs.  It is much more testable, and designers have much more control over the HTML that is rendered.

So now we have two ways of building Web Applications, the more “traditional” Web Forms approach and the newer “MVC” approach.  If you like the older Web Forms approach – stick with it – as the ASP.NET team is adding many improvements for  ASP.NET 4.0, but if you are more comfortable with a more testable approach and you want more control over the rendered HTML, now you have a Framework designed for you – MVC.

DotNetNuke is firmly planted in the Web Forms camp.  While there may be new approaches, that we can consider, and lessons that we can learn, it is not likely that we will convert the DNN platform to be built using the new MVC Framework.  At least not anytime soon.

Tags:
Categories:
Location: Blogs Parent Separator Charles Nurse

3 comment(s) so far...


Gravatar

Re: ASP.NET MVC – Web Forms 2.0?

Thanks Charles. I'm interested in your thoughts regarding the whole MVP vs MVC debate. Here's my take. MVC is great for testability if you want to build a web application. However, if you think you may want to support other user experiences down the road or want to use Web Forms, then MVP is the way to go. MVP is great for testability and you can replace some of your Web Form controls with regular HTML controls if you want to go lite and maybe make use of some jQuery wonderment on the client side. In my mind, MVC is more of an academic pursuit for the purists at this point and not an architecture that will allow me to build the widest range of applications from one codebase.

By Don Worthley on   12/5/2008
Gravatar

Re: ASP.NET MVC – Web Forms 2.0?

Perhaps today is not the day to switch to MVC. There is still some time that needs to go by before everyone fully understands how to program this. It is interesting though. This pattern is very testable which makes it perfect for test driven development. That development scheme should make it easier to make reliable code that can be reliably enhanced over time. If this is a paradigm that even a decent percentage of ASP.NET developers utilize, there should be an increase in application quality coming down the road. I also saw a talk by Scott Guthrie where he talks about the speed of MVC. He says it is designed to be super fast... he says 1200 page views per second and over 10000 per second with caching. Here is a link to his talk on MVC.
www.hanselman.com/silverlight/ScottGuAtAltnetConf/

By joiseystud on   12/17/2008
Gravatar

Re: ASP.NET MVC – Web Forms 2.0?

Hi Charles,

I like all the benefits that the DNN platform offers, but also see an advantage to using MVC for pure AJAX scenarios.

Have you experimented with a hybrid approach, where a module may be written using asp.net mvc for dotnetnuke?

This would provide the best of both worlds for developers that like using MVC for better TDD.

Mitch

By Mitch Labrador on   1/23/2009
Attend A Webinar
Try An Online Demo
Download DotNetNuke Professional Edition Trial
Have Someone Contact Me

Like Us on Facebook Join our Network on LinkedIn Follow DNN Corporate on Twitter Follow DNN on Twitter

Advertisers

Sponsors

DotNetNuke Corporation

DotNetNuke Corp. is the steward of the DotNetNuke open source project, the most widely adopted Web Content Management Platform for building web sites and web applications on Microsoft .NET. Organizations use DotNetNuke to quickly develop and deploy interactive and dynamic web sites, intranets, extranets and web applications. The DotNetNuke platform is available in a free Community and subscription-based Professional and Enterprise Editions with an Elite Support option. DotNetNuke Corp. also operates Snowcovered.com where users purchase third party apps for the platform.