Emerging Technologies: Making the Web Dynamic--DOM and DAV
2004; University of Hawaiʻi at Mānoa; Volume: 8; Issue: 1 Linguagem: Inglês
ISSN
1094-3501
Autores Tópico(s)Web Data Mining and Analysis
ResumoFive years ago, in the January, 1998, issue of LLT, I wrote a column on Dynamic Web Page Creation, discussing options for Web interactivity and bemoaning incompatibilities among browsers. In the current column we will explore what has changed since 1998, new options that have arrived, and where we are with standards implementation. Scripting Transformations: CSS and the DOM Five years ago, Cascading Style Sheets (CSS) were just beginning to be used in designing Web pages; the specifications for CSS 1 were at that point about a year old. Since then, CSS Level 2 (May, 1998) is an approved recommendation (by the W3C), and CSS Level 3 modules have been issued as working drafts or candidate recommendations. More significant than the W3C activity is the fact that CSS has become the most widely used method for formatting Web pages. This development has only been possible because of CSS support in Web browsers. Beginning with the 5th generation browsers (Internet Explorer 5, Netscape 6, Opera 5), support for CSS 1 has been sufficiently robust and consistent to encourage developers of HTML authoring tools to incorporate CSS support. A helpful development that has served to encourage more wide-spread deployment of CSS has been the push to provide more accessible Web pages. Accessibility to users with special needs is much easier to code in a consistent and machine-readable fashion using CSS than in traditional HTML formatting, often built around the use of tables for formatting. CSS use is an important step towards creation of a semantic Web, that is, Web pages which have content clearly separated from formatting and thereby ease document search and retrieval. The use of styles to format Web content brings another benefit: It allows on-the-fly transformation of content displayed on a page. This provides a powerful means to change instantly the look and feel of Web pages. It is a fairly straightforward process, for example, to allow the viewers of this page, assuming they are using 5th generation browsers or later, to change the font style (to Palatino or Comic Sans MS) or font size (to 16 or 10) [script from Apple Developer page]. With CSS this is done immediately, without the necessity of reloading the page or fetching fresh content from the server. As the Web becomes the central means for delivering all kinds of information, it makes sense to accommodate user preferences as is done in traditional software programs. The real magic of CSS is evident only when combined with scripting access to the properties of a page's DOM or Document Object Model. The DOM provides a standard way to represent and access all the items on a Web page, conceptualized in a hierarchical fashion, like a tree with branches. The tree describes the entire HTML document, with each item being a branch representing an HTML tag or a textual entry inside a tag. The relationships of the items to each other (parent, child, or sibling) are represented in the tree. A node of a page's DOM tree is an object (such as an HTML tag like or or a string of text) that has a set of properties that can be accessed and changed. DOM Level 2 became a W3C recommendation only a year ago (January, 2003) but has been around as working draft since 2000. DOM Level 3 is under development. The acceptance of the DOM and its support in current browsers goes quite a ways in solving the lack of standards in DHTML (dynamic HTML) discussed 5 years ago. The problem of DHTML in 4th generation browsers was not just incompatibility, but also limitations on access to Web page contents. The ubiquitous image swapping (image changes as cursor passes over it) was made possible because images were one element which could be manipulated. But that did not hold true for all parts of a page. While under DHTML individual objects--but not all of them--could be accessed and transformed, under DOM the whole document is accessible. Moreover, under DHTML each tag object had a different set of properties. …
Referência(s)