January 23, 2015 • 3 min read
This week I’ve been learning more about the Document Object Model, known as the DOM. I’d like to summarize my thoughts, with the goal of explaining what the DOM is, why it is relevant today, and why it can seem difficult to understand. I’d also like to share resources I found informative.
The DOM is a cross-browser, language-independent convention for representing and manipulating objects in HTML.
The DOM is one of the most important features of the modern internet. Anytime a script is changing elements on a web page, it’s referencing the DOM.
The early internet did not feature any of the fast, dynamic content we see today. Instead, it was a delivery system of static HTML pages from a server to a client.
Eventually, the demand for dynamic content increased, and software engineers worked hard to create products to satisfy that demand. The DOM rose from that era as a way to maintain and represent the state of a user’s browser.
Few features of the web development stack are more vaguely understood than the DOM. To understand why, you must consider the history of the DOM.
The DOM was born during the browser wars of the 1990’s, as Microsoft and Netscape battled for market share. Both companies chased users by building more powerful, feature-rich, proprietary browsers. Standardization would have hurt both businesses, because a superior version of the DOM was seen as a competitive advantage. Different standards were developed, maturing separately for a decade.
Today, the browser market is more fragmented than ever. Luckily, the major players are working with the W3 to standardize and document the DOM. However, I think that the legacy of incompatibility and secrecy has given the DOM a confusing reputation.
The DOM is a massive subject; here is a short list of related resources I recommend:
If you are interested in what is possible using the DOM, check out A Dark Room. Beyond being a fun throwback, it’s a reminder of what can be done exclusively in the browser.
Thanks to all these content providers, and everyone I talked and paired with this week.
Blog of Jake Worth, software engineer in Maine.