Chapter 8. Active Browser Pages: From JavaScript to AJAX

IN THIS CHAPTER

  • JavaScript

  • Cascading Style Sheets (CSS)

  • Dynamic HTML (DHTML)

  • AJAX

  • Case study: Five-star-rating widget

OBJECTIVES

  • Review the evolution of dynamic page presentation techniques.

  • Consider the limited options available for dynamic manipulation of page content before the advent of JavaScript.

  • Illustrate how JavaScript is used to exercise programmatic control over web page presentation.

  • Present an overview of CSS, with an emphasis on using it to facilitate dynamic presentation.

  • Discuss DHTML, showing how it can be used to modify page content dynamically and to perform client-side validation.

  • Introduce AJAX and discuss how it enhances the end-user experience.

  • Show how remote content injection and validation are accomplished using AJAX-based techniques.

  • Demonstrate the advantages of toolkits for enhancing productivity and eliminating cross-browser incompatibilities.

  • Use a case study to illustrate the concepts.

Markup languages, while very powerful, have their limitations. They provide formatting instructions for the static rendering of content. HTML, especially in combination with CSS, makes it possible to control page layout, combine text with graphics, and support minimal interactive capabilities through links and forms. HTTP servers transmit responses whose bodies contain HTML documents, and browsers receive these responses and render the documents.

The problem is that the presentation is static: HTML does not provide a mechanism ...

Get Web Application Architecture: Principles, Protocols and Practices, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.