Overview

Jade simplifies the use of HyperText Markup Language (HTML) pages from an external source by providing the following facilities.

The HTML process flow is as follows.

  1. A request is received from the web browser.

  2. The web application receives the request and determines that it is an HTML page request.

  3. If the application determines that it is the first request, it finds the home page and returns it to the web browser.

  4. If it is not the first request, the application creates an instance of the class associated with the page and updates its properties.

  5. Jade logic accesses this instance and performs the required processing.

  6. Jade logic sends a response back to the web browser, which could be the same page updated or a completely new page.

  7. Repeat the process, starting from step 1.

You can break into any phase of this cycle by using method reimplementation. For details, see "Reimplementing Methods to Interrupt the Processing Cycle", later in this chapter.

In this chapter, an HTML file is referred to as an HTML document and the presentation of that file on a web browser at run time is referred to as an HTML page.