.KEYWORD pqa
.FLYINGHEAD BUILDING WIRELESS APPLICATIONS
.TITLE Developing a Palm VII PQA that reads data from a Domino database
.OTHER
.AUTHOR Bruce Elgort
.SUMMARY The Palm VII is a very cool device. But to get data into it, a special Palm Query Application (PQA) must be written. In this important article, Bruce Elgort shows you how you can write your very own PQA. But that’s not all. If you use Lotus Domino, Bruce shows you how you can download Domino information directly into your Palm VII via a PQA of your own construction. Slick!
When I first purchased my Palm VII back in July, I thought that the applications that ran on the organizer required me to learn yet another development framework. I had heard that developing Palm OS applications wasn’t a trivial task. Much to my surprise, I learned that developing a Palm Query Application (PQA) to read data from a Lotus Domino database was a relatively simple process.
Don’t get me wrong, as the complexity of an application increases, so does the development of the PQA and back-end Web clipping processing files and scripts.
There are two parts to a Palm Query Application that you need to develop:
.BEGIN_LIST
.BULLET The Palm Query Application itself, which will reside on the Palm VII organizer.
.END_LIST
.BEGIN_LIST
.BULLET A CGI script, or in the case of Lotus Domino, a LotusScript or Java Agent that generates Web clippings using data from a Domino database. The Web clippings are sent back to the Palm VII as HTML.
.END_LIST
.CALLOUT You only clip the information you need and not all of the articles and photos on the page.
.H1 What is a Web clipping?
The term "Web clipping" is based on the analogy of clipping an article out of a newspaper; you only cut out or "clip" the information you need and not all of the articles and photos on the page. So when you as a developer are writing a PQA or an agent to generate a Web clipping, keep the user in mind and give them only what they asked for. Don’t give them any flaming logos!
Since the display of the Palm VII is limited in size, trying to display Web pages designed for an 800 by 600 dpi screen is impossible.
.H1 The Palm Query Application
The Palm Query Application is made up of one or more text files and graphics that are authored in a subset of HTML version 3.2. You can use WordPad or any text editor or HTML authoring tool to develop these files. These files then get compiled into a PQA using the Query Application Builder tool available from the 3Com Palm.Net Web site. A user can then use the HotSync utility supplied with the Palm VII and install the PQA on his or her organizer.
When developing PQAs, it’s important to remember that you aren’t developing Web pages for a fast Pentium PC with a 19" monitor and a 56kb modem. You’re developing Web pages for a monochrome device whose screen resolution is 153 by 144 pixels and communicates at an effective transmission speed of between 8kb/s to 19.2kb/s. You need to use the screen real estate effectively. PQAs are based on a simple query and response metaphor where the user enters and/or selects choices from the PQA and a discrete set of information is returned as a Web clipping to the user.
.H1 Which HTML features are not supported?
There are several HTML 3.2 tags that are not available to you when developing the PQA and Web clipping scripts. They are:
.BEGIN_LIST
.BULLET Image Maps;
.BULLET Animated GIFs;
.BULLET Cookies;
.BULLET Nested Tables;
.BULLET Frames;
.BULLET JavaScript;
.BULLET Java Applets;
.BULLET Style Sheets;
.BULLET Named Typefaces.
.END_LIST
.H1 A Simple PQA application
Many Notes developers have written a customer tracking database in Notes before. Since this article is intended to help Notes developers build PQAs, it seems reasonable to use such a customer tracking database as an example for this article.
Let’s take a look at a PQA that will return a list of customers from a simple customer tracking database using the Palm VII. The code below shows a text file called Customer.html that can be compiled with the Query Application Builder tool. As you can see, the file contains standard HTML tags and also contains a form with a submit button that, when tapped with the stylus, gets posted to a Domino server.
.BEGIN_CODE
PalmBuilder.com
Customer Tracking Demo
Developed by Bruce Elgort
DominoPower and PalmPower
.END_CODE
Notice that when our form gets posted to the Domino server the pqaCustomerQuery agent is actually run. This agent will take the data from the form and then generate a Web clipping that will be sent to the Palm VII for display. Let’s look at the form tag again:
.BEGIN_CODE