Programmingfail

20080505545

For most sites dealing with any sort of commercial, enterprise level CMS I’ve conceded the fact that the final product is not going to send valid HTML to the browser. Whatevs. It’s as well formed as reasonably possible and while it hurts, there are more important things to spend dollars on. What I can’t get over is custom pages that fail due to .NET’s insistence on wrapping the document in a form tag with the deprecated name attribute and inserting semantically meaningless ID’s on elements.

And if your a .NET guy, I’m there are much more complete/proper discussions on this topic. This from the perspective of an irritable front-end sort of fella.

xhtmlconformance mode=”Strict” != strict

.NET loves its web.config files. One option available is a setting for xhtmlconformance. At first pass setting its mode="strict" seems to solve the name attribute issue. However, it actually only works for clients .NET recognizes. For other clients such as outdated browsers, wget, bots or, say, the W3C Validator, it serves down-level content with all the cruft. Neat. So now those proud links promoting the quality of the code to potential clients actually suggest developer/marketing failure. Remember: transitional is for sissies.

To make .NET serve proper content to other clients you need to it tell about them. This comes in the form of brower config files to identify other browsers outside those .NET knows on its own. Neat. More XML.

The gripe

In most cases this doesn’t matter: who cares if the validator isn’t seeing the right code, especially considering real browsers are indeed getting valid HTML? It’s irritating in that the framework makes you tell it to do the right thing rather than defaulting to doing the right thing. It’s backwards. Rather than setting the exceptions I’m setting the norms. It is what got everyone fired up about the IE8 default rendering mode issue – don’t render code like it is 1999, do the most standards compliant thing possible and break down only if told to do so.

I’m done talking about something I really know nothing about.

Comments

  1. jb 20080506

    are you really doing .NET programming now?

    we run into the same thing in Struts-land. we need to stick a “” tag in the JSP to tell Struts to not be dumb and comply with standards.

    like you said, “It’s irritating in that the framework makes you tell it to do the right thing rather than defaulting to doing the right thing.” there’s truly something to be said about “convention-over-configuration” frameworks (RoR, Grails). i dont think its a trend. and if it is, its a good one.

  2. waytoocrowded 20080506

    Me doing .NET? No. I just end up touching a little bit of it and seeing way too much of it developing sites using some commercial CMSs.


Skateboards and bikes are better at nights

Skateboards and bikes are better at nights. 0 comments.


Search WayTooCrowded
The Header Should Always Point Home