Rendering Technologies for Mobile Clients

   

To focus on a specific and very useful scenario, let us suppose that we want to deploy a web-based application on a cell phone. Four rendering technologies are supported to various degrees at the time at which we write this book.

  1. WAP/WML: The Wireless Access Protocol and the Wireless Markup Language

  2. XHTML: The XML representation of HTML, or a subset thereof

  3. XUL: The XML User Interface Language

  4. J2ME: The Java 2 Micro Edition

WAP is a protocol stack for wireless devices, and WML is a markup language that is loosely equivalent to HTML. However, WML is optimized for cell phones with a small display. WAP/WML enjoys wide device support, but it has had only limited commercial success. WML user interfaces tend to be rather cumbersome and unattractive. We do not discuss WAP/WML in this chapter, but you will find that the techniques that we introduce can be easily modified to render WML.

Mobile phones that render an XHTML subset in "micro browsers" are becoming more common. There is no technical challenge in rendering XHTML for phones in a JSF implementation. You merely need to keep in mind that pages destined for cell phones need to be fairly simple, with small amounts of text and graphics.

XUL is an XML dialect for defining interactive user interfaces. The poster child of XUL is the Mozilla browser (as well as its mail and composer components). Micro implementations of XUL are available on handheld devices, but they are not common. The web site http://xul.sourceforge.net contains a good overview of XUL technologies.

NOTE

graphics/note_icon.gif

The JSF reference implemen tation contains a XUL demo. The purpose of that demo is not to show how to deliver an XUL application from a web server. Instead, the demo proves that you can host the JSF engine inside an XUL container, replacing the servlet container.


The Java 2 Platform Micro Edition (J2ME) is a version of Java that is optimized for small devices. J2ME affords different flavors for cell phones, cable television boxes, car computers, and so on. Cell phones are supported by the MIDP (Mobile Information Device Profile) library. That library is tailored for devices with limited memory, small screens, and a numeric keypad.

MIDP applications can use the power of Java to produce user interfaces that take optimal advantage of the limited screen size. For example, the "SmartTicket" application from the Java blueprint series paints a seating chart for a theater, allowing the customer to pick a seat (see Figure 11-1). It would be difficult to realize such an effective interface on a micro browser.

Figure 11-1. The SmartTicket application

graphics/11fig01.jpg


Network transmission is far slower and more expensive in cell phones than in desktops. For that reason, MIDP applications typically place more application logic onto the client than a browser-based application would. For example, validation and simple navigation logic should be handled on the client.

In this chapter, we focus on the development of J2ME-based applications. The server-side techniques that are necessary to support these applications can easily be adapted to support other mobile technologies.



core JavaServer Faces
Core JavaServer Faces
ISBN: 0131463055
EAN: 2147483647
Year: 2003
Pages: 121

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net