Information in the database ultimately needs to be presented to the user for viewing and manipulating. The Web Application Framework provides a variety of systems to display and style information. Each system has its strengths and weaknesses, and is designed for specific situations.
The following sections discuss the various methods available for presentation under WAF. Each approach is designed to be complementary to the other approaches. Each approach is intended to be used in different situations; the following sections discuss when each system should be used.
Presentation in the context of the Web Application Framework was originally discussed in Section 1.2.5 Presentation. For information about implementing Bebop, the presentation method unique to Red Hat WAF, see Chapter 12 Presentation (Bebop) Tutorial. Further information and tutorials about implementing the open standards presentation methods in WAF can be found through Chapter 14 References and on the Web.
This section discusses the standards used in WAF for textual presentation of structured data. In addition, the standard Java APIs for parsing and manipulating structured data are reviewed. This information is provided to set a common understanding of which tools are incorporated into WAF and how they are used.
HyperText Markup Language (HTML) is the predominant web standard for rendering documents. In WAF, HTML is produced either by JSPs or by transforming the XML generated by Bebop pages. WAF applications use HTML in conjunction with the following technologies to render and style an application's output.
XHTML is the newest version of the HTML specification, adapted to conform to the standards of XML.
Cascading Style Sheets (CSS) is a standard mechanism for adding presentation information (style and layout) to HTML documents. See Section 5.2 CSS and XSLT for more information. WAF uses CSS to style the HTML produced in JSPs and Bebop pages.
eXtensible Markup Language (XML) is a standard format for representing arbitrary tree-structured data in textual format. XML documents appear similar to HTML because both are derived from Standard Generalized Markup Language (SGML). WAF uses XML in its Bebop component UI framework to describe a UI before it is styled.
Document Object Model (DOM) is an API (available in both C++ and Java) for manipulating an XML document as a tree structure in memory. The heart of the DOM is the Node object, which represents an element or attribute; a Document is the top-level object that represents an entire XML document. WAF uses DOM to generate Bebop presentation XML. Bebop uses the J2EE JAXP API to manipulate DOM documents.
eXtensible Stylesheet Language Transformations (XSLT) is a language for specifying rules to transform an XML document into some other kind of output. It is most often used for rendering XML-formatted data into an XML presentation format such as XHTML. WAF uses XSLT to convert Bebop source XML into HTML for the client browser. Bebop uses the J2EE TrAX API to plug into and use one of several available transformer implementations.
See Section 5.2 CSS and XSLT for more information about XSLT.
JavaServer Pages (JSP) is a J2EE standard for scripting dynamic web pages. JSPs typically produce HTML, though they can generate any XML markup. WAF supports the use of JSPs as a primary means of writing web UIs.