Untitled

You run your viewer application (called a web browser) and use it to download a data structure (called HTML) that describes a document. The browser takes that structure and turns it into a styled layout (called a web page) for you to read. Pretty cool. But it gets much cooler.

You can generate that data structure (HTML) programmatically. Which is to say: its meaning can be driven by behavior and other data. And it gets even cooler than that.

The data structure, before being displayed as styled text, is converted into a tree structure (called the DOM). You can run code to inspect and modify this tree structure. This adds another place where you can intercede behavior.

Let's recap: you generated some output via one means, then you ran some code on the output to sculpt it further. In a viewer application. Incredible!

The geniuses who made Netscape 2 conceived the DOM as an interface for a programming language to use to manipulate HTML.

The DOM has some fantastic properties:

These properties make the web programmable. They enable almost all of dynamicness that we think of as a modern web app. They enable tools to be built on top of the environment. For example: inspectors and debuggers like Firebug that present intuitive output.

Having the DOM available to develop against feels like a privilege. I love it.


Part of Mary Rose Cook’s research to build software quickly