Fremus.co.za

Demistifying Life and Web Development

Archive for February, 2010

A case for ASP.NET MVC

What is the case for ASP.NET MVC? Lets forget the architecture for a minute and just focus on what it offers me as the developer, or rather what features do the other ASP.NET technologies offer that I do not like using. For starters web forms are ‘heavy’ and not as lightweight as ashx files. ASHX files are lighter because they do not have all the overheads a webform has, but they lack HTML support. The HTML support in webforms sucks because it does not render clean HTML, the tag id’s for instance, and viewstate are examples of ‘unclean’ html. For HTML support in a ashx file you will need to write some code that reads HTML and renders it, plus you will have to do some string manipulation somewhere to place content in the HTML. This seems a bit cumbersome to me. Why cant I have my HTML generated without having to do something like that, but also without worrying about clean HTML. ASP.NET MVC renders clean HTML. ASP.NET MVC Controllers are also available through XmlHttpRequests, making it easy to implement AJAX functionality.

Two reasons to use ASP.NET MVC:

  • Clean HTML
  • Controllers can be called from JavaScript
  • Share/Bookmark
posted by fr3dr1k in ASP.NET MVC and have No Comments
Get Adobe Flash playerPlugin by wpburn.com wordpress themes