The data presentation component uses the presentation language component to build layouts and designs for the data. This is the component where you put all the functions needed to render the data. Presentation Languages There are a lot of new presentation languages available that can display pages on browsers and even voice-enabled languages for the phone. This is a short summary of a few presentation languages: . HTML HTML 4.1 is indeed a presentation language. A lot of fixes had been applied to the language to modularize many presentation aspects, mainly involving the use of CSS. HTML with CSS is a popular presentation language and the one that most browsers use today, so it has a lot of importance. If you are going to use HTML as a presentation language we recommend reading the W3C (http://www.w3c.org/) recommendations and use CSS to abstract the style from the content in HTML pages. . XHTML XHTML is an XML-compliant version of HTML by the W3C. It is very similar to HTML but more restrictive: the file must obey XML formatting rules. It is a very good idea to use XHTML instead of HTML for new applications; as it is probable that XHTML will replace HTML in a near future. . HDML HDML is a reduced subset of HTML for handheld devices and PDAs. While some devices can display HTML, there’re a lot of restrictions that apply to the kind of content that a hand held can display. . WML WML is an XML vocabulary for presentation of content in mobile devices, usually phones. WML has features such as forms, paragraphs and tags that a WML-enabled cell phone can display. Most WAP applications today use WML as their presentation language (Chapter 16 contains a multi-tier WML application). . SVG SVG is an XML vocabulary to display graphics. A set of tags can be used to display geometric figures such as circles, rectangles, text, lines, and so on. Graphics are defined in XML in a vectored way (JPG, GIF, and BMP are bitmaps). There are plugins available for browsers and specific tools to display SVG files, SVG graphics can be of great quality and they have many interesting features such as non-deforming zoom (because the graph is vectorial), a scripting language to provide animation features, searchable text in graphic files and so on. You can learn more about SVG from the W3C site (http://www.w3.org/). . VOICE XML Voice XML is yet another presentation language using an XML vocabulary. It is used to build voice enabled sites and applications. An XML vocabulary can be used to voice phrases, accept DTMF codes, and so on. You can visit the W3C site to and find out more about Voice XML. If your web site or application will have to use a huge number of presentation languages then you may find an XML based architecture useful. We will cover XML based architectures later in the chapter. XML-Based Architecture In an XML-based architecture, the idea is that the logic layer of the application will generate XML data, which can be transformed using XSLT to any presentation language that you need: The XML web publishing framework separates web content generation into three different steps: . XML Creation Content owners create and develop the XML file(s). The content owners do not need to know anything about how their content is processed or presented. In our applications, the business logic layer will be responsible for generating the XML content. Some database vendors are enabling their databases to produce XML data directly out of SELECT statements. . XML Processing The XML file is processed. Any intermediate logic is applied here. This step may be eliminated Page 535
Hint: If you are looking for very good and affordable webspace to host and run your tomcat hosting application check Sandzak.com tomcat web hosting provider