Considerations and Recommendations
Table 1 shows some of the major considerations and recommendations for a disparate client application.
Sample Application Overview
can you provide support for multiple user agents?
Use common server side code for all user agents...
Use XML and XSLT. The XML documents contain data common to all
clients. The XSLT performs the transformations required to change the XML into
the format appropriate for each user agent.
the generated response depending MIME types appropriately for the requesting
device. To respond to a WML request, for example, the MIME type must be set to
you perform XSLT Transformations on the server or on the client?
use server-side transformations. Not all user agents support client-side
can you provide support for I18N?
UTF-8 encoding format MUST be used.
the ResourceBundle and Message Bundle classes and java.text
the application rely on cookies for state management?
cookies, how can you manage session data?
URL re-writingsome user agents don't support cookies.|
you use absolute or relative URLs to reference server resources?
absolute URLs to avoid potential problems with user-agents that don't support
In this simple example scenario the first JSP page in the application displays a page containing hyperlinks. When the user clicks on a link, the application responds with a specific page. to accept choices and second one will be a resultant page. The figures below show how the application looks when accessed from a Web browser (see Figure 2
), from a WAP emulator (see Figure 3
) and from an iMode phone (see Figure 4
). As you can see, the content of this sample application is extremely simple, so you can concentrate on how the application generates appropriate language and device specific responses.
|Figure 2 - User making a request with a WEB user agent|
|Figure 3 - User making request with a WAP user agent|
|Figure 4 - User making request with an iMode user agent|
The complete request/response cycle for this application consists of four main components:
- A JSP page, which provides the logic that processes the request and drives the response sequence.
- An XML generator, responsible for generating an XML page.
- An XSL stylesheet, which formats the response appropriately for the requesting user agent. XSLT is used for server side transformation.
- A Resource Bundle file, which provides I18N support
shows a sequence diagram that illustrates the order in which the application initiates each of the components to complete a request/response cycle.
|Figure 5 - The sequence diagram shows the generalized interaction of the main application components|
shows the top-level application deployment architecture, and illustrates the placement and the interaction sequence between the components.
|Figure. 6: Disparate Client Support Application Deployment Architecture (J2EE)|