Palm OS Web Application Developer's Guide: Developing and Delivering PQAs with Web Clipping

In a word processing program, you have a document with words, images, and formatting commands. In a spreadsheet, you have a table of cells, each with its own value or formula. In an adventure game, you have the player s current location and the inventory of objects that the character is carrying. Although this data is all different, it is united by a common concept called state. The state of a system is the information that differentiates one instance of the system from another. State can be very simple: a light bulb is either on or off. It can also be very complex: the air traffic control system s state includes the position and velocity of every aircraft in the sky, along with information about each airport.
Computer programs can be seen as processors of state. They all start the same way, then they change states based upon the input of the user, eventually using that state to produce output. State has lots of different names: memory, storage, databases, and variables are just four terms that describe different forms of state.
On the Web, state is a problem. Hypertext Transfer Protocol (HTTP), which is used to communicate between Web browser and Web server, is a stateless protocol: Each page served by a Web site is independent of the others, and the server does not remember anything from one transaction to another. This is done intentionally; building a server with no...