Java 2EE and XML Development

Скачать в pdf «Java 2EE and XML Development»

5.1.3 An example to work through

To really get at the heart of the matter and see how XML can help overcome the thin-client blues, let us look at some example requirements. For the sake of ubiquity and clarity, we examine a relatively simple user interface and a single point of functionality in a fictitious application. The application is a stocktrading web site, and the functional point to be explored is the rendering of a specific user’s “watch list” of stock prices. Constraining our example to one small functional point allows us to concentrate on dynamically changing the user interface without bogging down in other details.

Here are the requirements that concern us in this chapter:

■    The watch list page must be viewable via PC-based web browsers and WAP-enabled cell phones.

■    The watch list page is rendered for two locales, the United States and Great Britain. Each locale requires its own specific interface with appropriate textual messages.

■    The price for each stock listed on the watch list should be expressed in the user’s local currency, USD (United States dollars) for the U.S. and GBP (British pounds) for the U.K.

You can see from the requirements above that our watch list user interface must consist of four pages. Figure 5.1 is an HTML page rendered for users in the United States.

Figure 5.3 is a WML page rendered for users in the United States.

Скачать в pdf «Java 2EE and XML Development»