DOM and DOMer
By Michael Floyd
Lacking more sophisticated tools, early man used his own body to measure lengths, it is said. In many cases, the unit of measure was his foot. As the foot measure came into widespread use, the problem was whose foot were they talking about? Eventually, the foot of a king was chosen as the foot by which all lengths would be measured. That's called standardization.
When it comes to Dynamic HTML, the problem once again is whose DHTML are we talking about? According to Netscape, DHTML is simply a matter of combining JavaScript with HTML in order to make Web pages interactive. Microsoft's vision, somewhat more ambitious, takes a document-centric approach that views an HTML (and now XML) document as a container of objects that can be manipulated. Thus we can, for example, change the value of the COLOR attribute for the <FONT> tag from "red" to "blue." Once again the W3C is attempting to resolve this clash of ideologies, this time with the recently released Document Object Model (DOM) Level 1 Recommendation.
The DOM lays out an object-oriented view of Web pages. Why is this significant? First, both major browsers, which are written in C++, break down the components of a Web page into a collection of objects that can be manipulated internally by the browser's software. A bonus is that you, too, can access these same objects using a programming language like Java or a scripting language such as ECMAScript. In fact, that's how we've been accessing the XML objects in Internet Explorer in previous columns.<>