Webstandards in Visual Studio 2005

One of the things i'm working on Is the development of Visual Studio 2005 templates for web applications. These will be used internally, in a large organisation.

I started by building a basic structural template in xhtml/css. For menu's and the likes they will be using specialised controls, so all they have to do is drag them to their spot in the master template.

Visual Studio 2005's implementation uses a very specific templating engine. using the Master, which contains the layout and page structure, you can define which areas can be edited. This is a very strict method, and it's quite easy to use standards based mark-up and CSS.

Working with the editable regions is a bit more complex. The standard components used in Visual Studio have awful mark-up. The "login" form uses two nested tables and is about 150 lines of html code. The mark-up of these components was in fact so horrendous, we decided to ignore them completely, instead focussing on putting the forms together manually. It won't be as easy as just dragging the components onto the canvas, but at least this way we have control over end product.

A morning's work shows me that whilst Visual Studio 2005 has come a long way (Documents have a default doctype of xhtml1.0 Transitional; and there are now possibilities that weren't there before for standards compliant code), the complete exclusion of the standard components in this optimisation process still makes it very difficult for a .NET programmer to produce web standards compliant code out of the box. Let's hope WASP can continue their efforts with Microsoft, and help make the next version of Visual Studio what it's supposed to be.

Read on