Bas Geertsema

The coming of the asp.net MVC framework had me thinking about the nature of markup and specifically the difference between the way ASP.NET Webforms handles this and the new ASP.NET MVC framework. I have not really used it yet, but when you come across MVC examples there is no doubt that the feel and look reminds you of the classic ASP style of writing markup: a lot of intermixing between markup and code and logic handling inside templates. Values are inserted with asp.net tags instead of in the code behind. Compared to the use of webform controls this might seem like more cumbersome work. But when I look at the efforts I actually spent at writing the HTML markup it turns out to be only a small part in the total project. For the interface functionality, a lot of my efforts go into making sure the layout and functionality of the website comes across multiple browsers in a uniform manner. I sketched a diagram which will make it more clear:

So actually I like it that the MVC gives you more control over the generated markup, since it will hopefully decrease my efforts to develop cross-browser compatibility (sigh) and create more lean-and-mean pages. There are already many helper functions available that can conveniently generate often-used html markup, such as internal links (action links) and textboxes. I am sure that we will see more 3rd party controls and utilities that allow you to generate more complex HTML (such as a treeview), but with more fine-grained control over the generated output and still hiding/covering the hard parts such as ensuring cross-browser compatibility.

comments powered by Disqus