Hints and Tips: Palm V and IRPurchasers of the Palm V and Palm IIIx will have been surprised to discover that the Palm OS version included with these models does not include the infra red patches that were released late last year for earlier versions. The IR patch can be installed on the Palm V, and I can report successful synchronisation with Windows 98 using the patch and IRSync 1.0, which the developer, IS/Complete, claims will not work. "And the earth was without form, and void" I have been intrigued by the interest in PDAs for use with "embedded" applications; as I have several times remarked, last year's Windows CE Developers conference had under 5% of attendees interested in horizontal applications, and greater than 60% wanted to learn about writing embedded applications. Until recently, if you talked about embedded applications, you were thinking of software that ran on embedded microprocessors, which were for applications as diverse as engine management in a car, to those that run power stations. In other words, computers designed to be part of a non-computer appliance. The watchword was "real-time", and 4K of RAM was a luxury denied to most. Now "embedded", in the sense that Microsoft's customers mean it, refers instead to custom applications that are blown into ROM (or flash RAM, or installed on disks), on a PDA. I would have called this a turnkey application only a year or two ago; but if the language changes, we have to accept it and move on. If we add to this the fact that Palm Computing tell me that the majority of their UK sales go through vertical market resellers, then it is clear that embedded applications are already a significant driving force in the PDA market. Typical applications that are suitable for embedded use in PDAs include product catalogs, price lists, sales order management, contact tracking, expense management, surveys, and so on. They all have several things in common: they are, in the simplest possible terms, simple forms based applications that are the front end to a database, and are often also being considered for web deployment. If the databases are read-only, and change relatively infrequently without any strong time dependencies, then PDA deployment is ideal; if, on the other hand, distribution of frequent updates and coordination of updates from the field is required, then web applications are likely to be better suited. Developing this type of application is very simple on desktop machines; complicated processing isn't normally required, as it is mainly a data capture and display exercise. This makes it suitable for both web applications and for PDA forms processing. Psion have an excellent record and long history of providing systems for vertical markets in the UK. Stock taking applications require portable bar code readers, which are available for all major PDAs, and now supermarkets are providing simple systems for customers to check prices. Windows CE, being a far more recent operating system, is being considered for a large number of applications, but isn't so well supported yet. Palm Computing are in a strong position: Symbol make modified devices that include bar code readers, and their products are sold by IBM as the Workpad to corporate customers. They also have a relatively advanced development environment for professional developers, Metrowerks CodeWarrior, and a couple of forms development packages: Satellite Forms, which was recently bought by Puma, and was covered, albeit very briefly, in the Palm development book published by O'Reilly ('Palm Programming: The Developer's Guide', by Neil Rhodes and Julie McKeehan, http://palmpilot.ora.com); and Pendragon Forms. Pendragon Forms is a cheaper, simpler product than Satellite Forms, and has the disadvantage of requiring developers to buy run-time licenses. The first copy costs $99.95, and subsequent licenses start at $45 per PalmOS client. However, although Satellite Forms is much more expensive ($369) and currently doesn't make a charge for run time licenses, Puma Technology are rumoured to be planning to introduce run-time pricing, the exact amount unknown, when they release Satellite Forms 3.0. http://www.pendragon-software.com/ When evaluating development tools, I have a number of standard applications that I like to develop to give them a thorough workout; last year in issue 43 (May 1998), I used them in WebObjects (Apple's high end web development environment) format to take a look at web clients on PDAs. One of these applications is a price list. This is an application that my company uses in a desktop format in the office, and shares a database with a WebObjects application installed on our web site. As the data is only infrequently changed, I decided to use this as a first test for Satellite Forms. I have used the trial version 2.0.2 of Satellite Forms, so that anyone can follow through the same sequence if they wish. | ||
The desktop version of PriceList | ||
Satellite Forms comes with an application design tool that runs on Windows 95/98/NT, that is used to visually lay out an application and create data tables for use with it. It can also install the applications and data to a Palm device via hotsync. You must first install the Satellite Forms application to the Palm, which you must start and select your application from a menu of others. Applications generated with Satellite Forms have a fixed menu structure, which the programmer doesn't have access to. Data tables are in dBase format, and can be imported into Access on a desktop system, or integrated with a server application using either the Satellite Forms ActiveX control, or a special DLL for Satellite Forms. It includes non-standard fields, such as one for ink data, which were never part of normal dBase. The server application is responsible for integrating updates from different users, if this is permitted, using the hardware identifier retrieved from the Palm. The PriceList database consists of two tables: one a straightforward list of products, which uses a second table as a simple lookup for product categories. See the screenshot for details of the products table. The table key is PRODUCTID, and CATEGORYID is an included foreign key for the Category lookup table (which consists of just two fields, CATEGORYID and NAME). | ||
Satellite Forms App Designer and a database Table | ||
You have to design the tables directly in the application designer, as there is no facility to import a table structure from elsewhere. Tables can be added at any time, as can Forms. A form is a single or multi-page screen layout, connected to a single database table. The App Designer lets you add objects to the form by clicking in a tool bar, and all objects, including the form itself, respond to a double click to open a properties inspector. I linked my Main form to the Products table, and restricted database permission so that Palm users can correct values, but can't add new products or delete existing ones. | ||
Form Properties | ||
I added a title object to the Main form, and a list box to contain a single line per product showing the product name and category. Showing the category is interesting, as it involves a look up function into the Category table. I decided to divide up the product details between two other forms: one for my product comments fields, and the other for all remaining information about the product, which fits neatly on a single page. | ||
the Main form | ||
| ||
the Comments form | ||
| ||
the Details form | ||
The Main form therefore has two buttons, labelled "Info" and "Details", one to link to each form. Most objects on a screen can be given an action, which includes linking to various combinations of forms, or running a script. In this case, both buttons link to a single other form, each of which is also linked to the Products table, and will show the details of the currently selected product. The menu can be used (on the Palm device) to move between records. | ||
Setting a filter from the drop list | ||
Both the details form and the main form have drop down lists; these are filled in from the Category table, showing all of the available categories. The list on the details page updates the CATEGORYID field from the selected Category record. The list on the main page isn't connected to the Product record, but instead uses another property shared by all form objects: a filter. Any object can either set a filter on the linked table, or clear the filter; filters can be combined in reasonably complex ways. This drop list just sets a filter on the Products table by CATEGORYID, and the "All" button next to the drop list clears all filters when pressed. This seems a simple and satisfactory way of handling relatively complex selection requirements. | ||
PriceList | ||
| ||
Filter | ||
| ||
Details | ||
The application doesn't have to be compiled, so as soon as the forms have been completed, you can download the application via a normal hotsync. Synchronisation feels subjectively a little slow, and this is something else that is due for improvement in the forthcoming 3.0 release. On the Palm it works well, and looks like a standard Palm application. I must say that Satellite Forms is a very powerful forms design product; I was expecting to be forced into using scripts for part of the PriceList application, and was pleasantly surprised that I didn't have to. The App Designer program has a consistent user interface, and where appropriate all screen objects implement the same sets of functions. As with most Windows based visual program builders, clicking on a toolbar places an object on the form in an unsuitable place - I would much prefer to drag objects off a palette to drop them were they are needed. Controlling the level of the form title objects caused me some problems, as it always wants to rise to the top, obscuring other objects placed over it. Otherwise handling of layering is good. I am disappointed that it wasn't possible to create a stand-alone application, and that the application menus are not customisable. But that's all - a very short list indeed of complaints for a development tool. For anyone wanting to produce embedded applications, or get a start with Palm development, Satellite Forms is an excellent approach. It is possible to accomplish a lot more with scripts, and plug-ins are available to support bar code readers and other extensions. Developers can even write their own plug-ins with Metrowerks CodeWarrior, using all of the capabilities of normal C++ development for PalmOS. The hardest part of developing a custom application for PalmOS will be integrating data updates back with the server, not writing the PalmOS application itself. |
||
Words and design by: |