Archive for February, 2006

So you think you know HTML and CSS?

Monday, February 13th, 2006

My general survey of the web is that most sites are a mishmash of HTML 3.2, 4, XHTML, CSS, and junk that could most be charitably called “text with angle brackets”. As the manager of the JavaScript team at a certain large internet retailer, I’ve found that poorly written HTML is the number one thing delaying the delivery of Web 2.0, AJAX, DHTML, or just plain better web experiences.

The reason is fairly simple. As soon as a browser encounters broken code it starts to make guesses about what you meant. Different browsers make different guesses. All the browsers are trying to turn your stream of text into a neat tree of elements with suitable decorations that represents the structures defined in the text stream. The JavaScript makes the page appear to be dynamic by manipulating the structure of these trees (called Document Object Model or DOM trees).

When the DOM is malformed, the JavaScript gets confused and the fancy AJAX features stop working. In extreme cases browsers have been known to crash when JavaScript has tried to manipulate a malformed DOM.

The answer is to make your HTML and CSS standards compliant and properly structured. Unfortunately, this is hard for a lot of reasons, not the least of which is that most of the web browsers don’t complain about bad HTML or offer any tools to help you find problems.

Which is why I wrote The Central Scrutinizer. This program will give you a summary of different kinds of errors on your web page from most severe to least. Clicking on an error group will take you to the errors and clicking on an error will show you where it is in your HTML or CSS.

If you find problems with the results, please use the comment form on the Scrutinizer or leave me a comment here. I hope you find it useful.

Here we go

Sunday, February 12th, 2006

I had started one blog years ago but I ended up hating the software and put off dealing with it until I could get around to writing my own.

I’ve started my own but other projects keep intervening and with wordpress now out for free I can’t quite justify the effort right now. So I’ll start with this and see how it goes.

I managed the “Rich Client Platform” team at Amazon.com. Basically we work on making the shopping experience more responsive and friction free using JavaScript (what everyone else calls AJAX). There is a lot of great stuff in the pipe, stay tuned and I’ll announce new features as they roll out.