additional hidden costs that became obvious by 2002 with the move from Web content to Web applications. By then, HTML, which began as a simple markup language, had evolved into three distinct layers:
HTML4. The markup tags and attributes used to serialize HTML documents;
CSS. The style rules used to define the presentation of a document; and
DOM. The programmatic interface to the parsed HTML document, used to manipulate HTML from within JavaScript.
The HTML4 specification went only so far as to define the tags and attributes used to serialize HTML documents. The programmatic API—the DOM—was defined within a separate specification (DOM 2) and never fully implemented by Internet Explorer. Making matters worse, CSS 2 was still under construction, and only parts of CSS 1 had been implemented in Internet Explorer.
Authoring Web content was now fraught with risks that would become apparent only over time. Authors could, with some trouble, create Web pages that appeared the same on the browsers of the time, at least with respect to visual presentation. However, when it came to styling the layout of a document via CSS or attaching interactive behavior via DOM calls, the shape of the underlying parsed representation proved far more significant than just visual appearance on a screen. As Web developers increasingly sought to add visual style and interactivity to their Web pages, they discovered incompatibilities:
Visual layout. To achieve a consistent visual layout, Web authors often had to resort to complex sets of HTML tables; and
Inconsistent DOM. Programmatic access of the HTML DOM immediately exposed the inconsistencies in the underlying representation in browsers, meaning that such programmatic calls had to be written for each browser and moved the Web further down the slippery slope toward browser-specific content.
But even as the hard-won Web looked like it would be lost to browser-specific Web content, the Web community was building on its earlier success of having a widely deployed universal
browser that could be controlled (if poorly) via HTML and JavaScript. The Web had moved from mostly static content to documents with embedded pieces of interactivity. Web developers soon came to exploit the well-known fact of client-server computing: that even in a world of powerful servers, there are more compute cycles per user on a client than there are compute cycles on a server. Islands of interactivity implemented via JavaScript within HTML evolved into highly interactive user interfaces. The introduction of XML HTTP Request (XHR) across the
34
various browsers freed Web developers from having to do a complete page refresh when updating the user interface with new content. This set the stage for Asynchronous JavaScript and XML (AJax) applications. 19
From late 1999 to early 2004, the line between content and applications on the Web was increasingly blurred. As examples, consider the following static (document-oriented) content and interactive (dynamic) applications:
Online news. News stories delivered in the form of articles enhanced with embedded video clips and interactive opinion polls; and
Shopping. Shopping catalogs with browsable items with interfaces, as well as real-time auction sites, enabling users to buy and sell.
This evolution from Web content to Web applications was accompanied by the progressive discovery of the Web programming model consisting of four Web components:
HTML. Markup elements and attributes for serializing Web pages;
CSS. Style rules for determining the final visual presentation;
DOM. Programmatic access to the parsed representation of the Web page; and
JavaScript. Open-ended scripting of the Web page through the DOM.
Here, the HTML, DOM, and JavaScript formed the underlying assembly language of Web applications. Though there is a clean architectural separation among content, visual-pre-sentation, and interaction layers, note that this programming model was discovered through Darwinian evolution, not by design. A key consequence of
this phenomenon is that content on the Web does not necessarily adhere to the stated separation. As a case in point, one still sees the HTML content layer sprinkled with presentational font tags, even though one would expect CSS to exclusively control the final presentation. Similarly, the content layer (HTML) is often sprinkled with script fragments embedded within the content, either in the form of inline script elements or as the value of HTML attributes (such as href and onClick).
Another key aspect of this phase of Web evolution was the creation of Web artifacts from Web components. Think of them as online information components built from Web-centric technologies—HTML, CSS, JavaScript— accessed over the network via URLs (see the figure here). A user-configurable component includes a customizable greeting, along with a photograph. Note that all of its aspects are constructed from five basic Web technologies:
Metadata. Component metadata encapsulated via XML;
Presentation. Content to be presented to the user encoded as plain HTML;
Style. The visual presentation of the HTML, controlled via CSS;
Interaction. Runtime behavior specified by attaching a JavaScript event handler (script) that computes the appropriate greeting based on the user’s preferences and updates the HTML with the appropriate content; and
URLs. All resources used by the component—the photograph, the CSS style rules, the set of script functions—are fetched via URLs.
The first phase of the Web—Web 1.0—concluding in 2000 was characterized by bringing useful content online through the application of Web technologies to information (such as weather forecasts) in order to make them available on the Web to millions of potential users worldwide. A consequence was that a vast amount of useful content was now available—addressable via URLs and accessible over HTTP—with the requisite content being delivered via HTML, CSS, and JavaScript.
The next phase of this evolution— Web applications—saw the creation of useful end-user artifacts out of content already available on the Web. As an ex-
feBRuaRY 2009 | vol. 52 | No. 2 | CommunICatIons of the aCm
55
References:
Archives