the document object model. the web b.d, a.d. they aren’t web pages, they’re document objects a...

16
The Document Object Model

Upload: virginia-lindsey

Post on 12-Jan-2016

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The Document Object Model. The Web B.D, A.D. They aren’t web pages, they’re document objects A web browser interprets structured information. A server

The Document Object Model

Page 2: The Document Object Model. The Web B.D, A.D. They aren’t web pages, they’re document objects A web browser interprets structured information. A server

The Web B.D, A.D.

Page 3: The Document Object Model. The Web B.D, A.D. They aren’t web pages, they’re document objects A web browser interprets structured information. A server

They aren’t web pages, they’re document objects

A web browser interprets structured information.

A server sends dynamically structured information.

A web page is a set of structured objects.

End-users interact with those objects.

They have agency; what end-users do matters.

To make all this work, you need a standard for communication.

Page 4: The Document Object Model. The Web B.D, A.D. They aren’t web pages, they’re document objects A web browser interprets structured information. A server

The DOM is. . .The DOM is a platform (and language) neutral interface that allows programs and scripts to dynamically access and update the content, structure and style of documents. The Document Object Model provides:

· A standard set of objects for representing HTML and XML documents;

· A standard model of how these objects can be combined, and;

· A standard interface for accessing and manipulating them.

Vendors can support the DOM as an interface to their proprietary data structures and APIs, and content authors can write to the standard DOM interfaces rather than product-specific APIs, thus increasing interoperability on the Web.

Page 5: The Document Object Model. The Web B.D, A.D. They aren’t web pages, they’re document objects A web browser interprets structured information. A server

Basic HTML objects

• HTML document declaration• HTML, HEAD, TITLE, BODY• DIV, LAYER• Basic tags (TABLE, P)• A legal, addressable Document

Object must have an ID attribute.

hint; view the Source

Page 6: The Document Object Model. The Web B.D, A.D. They aren’t web pages, they’re document objects A web browser interprets structured information. A server

The basic programming language used to dynamically interact with document objects, is JavaScript*. Increasingly, you will see references to AJAX; Asynchronous JavaScript And XML.

The XML standard is a leadership example of adherence to the W3C DOM standard.

* Other scripting languages include: VBScript; ASP ActiveX

Scripting languages

Page 7: The Document Object Model. The Web B.D, A.D. They aren’t web pages, they’re document objects A web browser interprets structured information. A server

All About AJAXAjax refers to a broad group of web technologies used to implement a web application that communicates with a server in the background, without interfering with the current state of the page.

Ajax refers specifically to the following technologies:· XHTML and CSS for presentation;

· The Document Object Model for dynamic display of and interaction with data;

· XML and XSLT for the interchange and manipulation of data, respectively;

· The XMLHttpRequest object for asynchronous communication; JavaScript to bring these technologies together.

—J.J. Garrett

Page 8: The Document Object Model. The Web B.D, A.D. They aren’t web pages, they’re document objects A web browser interprets structured information. A server

AJAX continued (from the Wikipedia entry for AJAX)

“ . .Since the original description, there have been a number of developments in the technologies used in an Ajax application, and the definition of the term AjaxJavaScript is not the only client-side scripting language that can be used for implementing an Ajax application. Other languages such as VBScript are also capable of the required functionality.The XMLHttpRequest object is not necessary for asynchronous communication. XML is not required for data interchange and therefore XSLT is not required for the manipulation of data. JavaScript Object Notation (JSON) is often used as an alternative format for data interchange, although other formats such as preformatted HTML or plain text can also be used. “

Page 9: The Document Object Model. The Web B.D, A.D. They aren’t web pages, they’re document objects A web browser interprets structured information. A server

What does it look like to me?Facebook: “What are you doing right now?”

NYTimes.com: News slider, personalized content

USAtoday.com: custom search, “recommends”

Page 10: The Document Object Model. The Web B.D, A.D. They aren’t web pages, they’re document objects A web browser interprets structured information. A server

What are dynamic interactions?· User-instigated changes in page content

· Calculations and updates made in reaction to user input

· User clicks

· Partial or complete page views

· Others?

Page 11: The Document Object Model. The Web B.D, A.D. They aren’t web pages, they’re document objects A web browser interprets structured information. A server

User-instigated changese.g. Status updates; comments in

blogs/threads

Tells you:

· Level of engagement / interest in site

· Level of engagement / interest in content

Page 12: The Document Object Model. The Web B.D, A.D. They aren’t web pages, they’re document objects A web browser interprets structured information. A server

Calculations and updates in reaction to user input

e.g. auto-fill forms, tax & shipping calculators, color & style changes

Tells you:

· User’s current interests

· Buying priorities, preferences and tendencies

Page 13: The Document Object Model. The Web B.D, A.D. They aren’t web pages, they’re document objects A web browser interprets structured information. A server

User clickse.g. hyperlinks, activations, “focus”events

Measures:

· Quality of writing / priming for hyperlinks

· Tendency to engage with content

Should be indexed by:

· Geography

· Page topic / index coefficient*

· Large-scale search trends

· Inter-site position

· Number of possible clicks in a given page

Page 14: The Document Object Model. The Web B.D, A.D. They aren’t web pages, they’re document objects A web browser interprets structured information. A server

Partial or complete page viewse.g. all images loaded T/F

Measures:· Quality of content presentation· Site-use behavioral tendencies (mtime)

· . . . more than the bounce rate. . .

Page 15: The Document Object Model. The Web B.D, A.D. They aren’t web pages, they’re document objects A web browser interprets structured information. A server

Other dynamic interactions?

Page 16: The Document Object Model. The Web B.D, A.D. They aren’t web pages, they’re document objects A web browser interprets structured information. A server

Questions & Discussion

• Any other questions from the TheStreet.com example?