Sunday, May 30, 2010

Real Controller

In general, MVC stands for Model (database), Controller (business logic), View (what you see/view logic). During the recent hands-on in ASP .NET MVC, Controller component is quite interesting. By the way, the vendor abstracts every thing and itz a matter of few seconds to create the app. Still, the cool point about the controller is that web request URL is routed programmatically thro built in mechanism. In the traditional ASP .NET, URL is through pagenames/URL rewriting via the physical locations in web server. If you notice the motive of web form, just to mimic winform model development with the introduction of ViewState and PostBack, which creates few problem. Many webpages have significant size of view state that affects the performance and also developers don't have the control of HTML rendering, which is done by server. Apparently, unit testing is quite challenging. Now, if you switch into MVC, it has clean separation of MVC, SEO and REST friendly URL, No viewstate and postback and programmatically routing. Isn't it Cool?


  1. Does Ajax fit in the ASP.Net MVC model?

  2. Yes, ajax mvc framework is available at codeplex. Basically to get post-back-less partial rendering and some behavior-like extensions to associate with DOM elements - sort of like ASP.NET Ajax but in a manner that fits with the pattern around how controllers and views are written