Working with an Application Server

Network-enabled applications often rely on an application server. The application server provides centralized data storage (a database) and high-performance processing power. Using a centralized server also allows the developer to develop a single server side with multiple client applications. For example, you could easily write iPhone, BlackBerry, and web versions of the Been There, Done That! application that use the same back-end application server. Scores and friends could then be shared across multiple client environments easily.

There are many ways to develop an application server. This implementation leverages a very simple, scalable server that uses Google App Engine ( com/appengine/) with Java and servlets. The Google App Engine technology stores information using a schemaless object datastore, with a query engine and support for atomic transactions. While the implementation details of the application server are beyond the scope of this book, it can be helpful to understand how it was designed.

Think of this example's application server as a black box with the following attributes:

► The application server is always on and available for users.

► The application server is remotely accessed via HTTP.

► The application server stores data, such as player settings, scores, and trivia questions.

The application server can be queried for information, such as top scores or batches of questions.

The application server uses JavaServer Pages (JSP) to handle HTTP requests and return the appropriate results in the XML format that the Android application expects.

The application server developed for use with this book is not part of the code on the website for this book. However, it is available for your use, in open source form, at

You could create an application server that has different characteristics than the one described here. For example, you could create a SQL database-driven application server using MySQL and PHP instead, or you could use a number of other technologies.

Was this article helpful?

0 0

Post a comment