Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Review:Palm Programming - the Developer's Guide
Handhelds
Posted by Hemos on Thu Dec 31, '98 07:58 AM
Jonathan Blocksom has taken some time out of his holidays to send over a review of Neil Rhodes & Julie McKeehan's (Mark Stone, Ed.) Palm Programming - the Developer's Guide. Click below to find out how to make your Pilot fly even faster.

REVIEW: Palm Programming - The Developer's Guide
Neil Rhodes & Julie McKeehan, Mark Stone, Ed.
O'Reilly

Nutshell
Review:
An excellent tutorial on typical Palm Pilot application development, great for both serious and hobbyist developers.
Rating: 9/10
Jonathan Blocksom - GollyGee Software, Inc.

The Scenario

So you want to write an application for your Palm Pilot. Maybe none of the apps out there scratch your particular itch or maybe your company is issuing Palm III's to the sales force and you've got to interface them with the company's database. Either way, you could download the 3-part, 900 page Palm OS 3.0 Reference Manual and start wading, or you could go out and get this book.

Those who don't own a Palm OS device like the Palm Pilot or Palm III may not know that the devices have a proprietary serial port that plugs into a small cradle or cable to hook up to your desktop computer. You plug in the PDA and hit the cradle's HotSync button, and the desktop computer runs software to synchronize the desktop and palm databases. Palm devices can also hook up to things like modems, GPSes, or bar scanners, making them very versatile appliances.

A Snapshot of Palm Development

Palm apps have up to three components: the forms, the application, and the conduit. The forms are the user interface elements, which are compiled along with the application source to make the executable that gets loaded onto the Palm device. The conduit is an optional software component which resides on the desktop computer and gets executed when you HotSync your Palm device. The desktop software that comes with the Palm Pilot has conduits which take care of mirroring the Palm and desktop databases and sending email written offline on the pilot. Conduits for other programs might do things like fetch a page off the web and download it to the Pilot, or upload data collected on the pilot to a company database.

Development for Palm OS is done in standard C with either the GNU SDK (available for Linux and Windows) or Metrowerks CodeWarrior (Windows and Mac). CodeWarrior provides a graphical GUI editor, whereas the GNU SDK relies on a text file description. Conduits are developed in C++; the Conduit Development Kit development is currently only available on Windows, although a Mac CDK is in alpha. Debugging of Palm applications is done using the Palm OS Emulator (POSE), a standalone program for all three platforms that simulates a Palm pilot on your screen. For the record, this reviewer develops on Windows with the GNU tools and Codewright as a front end.

What's Good?

The book has a well organized tutorial format and is very easy to follow. The topics are presented in a sensible order, and they also stand well on their own for those who like to jump around. Databases, which are to Palm devices what files are to desktop computers, are explained thoroughly and the book makes programming with them seem far less frightening than it does when you just read the reference manuals.

The example source code the book uses is also well presented. It refrains from full program listings (a CD accompanying the book has all the source code) but it still presents complete routines where appropriate. The listings are integrated with the text and there is none of that annoying "See listing 5.3" stuff. The code itself is well written and easily understood.

Many of the topics in the book contain handy checklists for implementing and testing, such as global find capability or IR communications. The book also goes over serial communications and TCP/IP interfacing, which will certainly come in handy for Palm VII developers. A full third of the book is dedicated to conduit development, certainly a godsend for those writing them.

One great thing about the book is that it covers all the major Palm development platforms. It is even-handed and considers the pros and cons of each; for example, although it usually reccommends resource creation using CodeWarrior's GUI form designer, it prefers textfile based tools for menu creation like those in the GNU SDK. It also covers debugging using the emulator with CodeWarrior and the GNU tools, and provides step by step instructions for getting it up and running. Unfortunately, POSE is not available for Linux, so debugging under Linux is not covered, though copilot (an older version of POSE) for Linux is included on the CD.

What's Bad?

If you read the book from start to finish you'd probably think that you knew everything about Palm OS development, but unfortunately there are a few important topics the book seems to miss. Floating point numbers are mentioned only in passing; floats were not supported in early versions of the Palm Pilot, but now floats are available with basic arithmatic operations. There is no standard Palm math library for floats, but there is a GNU library out there that implements the standard math library. A discussion of the hoop jumping involved to use it and including the library on the CD would make sense.

Graphics and sound are also not mentioned, which is disappointing and strange considering the number of games that people have written. Alarms and system preferences are also somewhat tricky subjects that might fit in well with the sample sales database application. There is also no mention of "hacks", an unfortunate name for the more or less standard method of adding extensions to the OS via a program called HackMaster. This is an advanced topic and something that is not really supported by 3Com, so it is understandable that it is left out.

Fortunately there are plenty of resources out there for people who want to do this stuff, so you're not out of luck if you're writing an app that uses these things. The Palm computing platform will also be around for quite a while, so we will probably see these topics addressed in future revisions of the book.

So What's In It For Me?

If you want to do any Palm development, this book will make it a lot less painful. The CD that comes with it contains software for all three OSes to get you started with development. It includes CodeWarrior Lite (cannot create new projects) for Mac and Windows and the GNU SDK for Linux and Windows. It also contains the Palm OS 3.0 documentation, the Palm OS Emulator, and source code for all of the books examples. The book also gives URLs for finding the latest versions of these tools -- useful in particular for the Palm OS Debug ROM images which must be downloaded from 3Com to use the Palm OS emulator.

There's also the O'Reilly Palm Programming Contest, which has been mentioned on slashdot before, and offers as prizes various amounts of cash and free Palm devices (probably not the Palm VII). This book is certainly the quickest way to get up to speed for writing those Palm OS killer apps!

Buy this book over here.

Relevant Links

Table of Contents

Palm Programming: The Developer's Guide

I. Palm-Why It Works and how to Program It

1. The Palm Solution
     Why Palm Succeeded Where So Many Failed
     Designing Applications for Palm Devices
     Elements in a Palm Application
     Summary

2. Development Environments and Languages
     Overview
     Handheld Development
     Alternate Development Environments
     High-level Forms Development
     Conduit Development
     Conclusion

3. Designing a Solution
     User Interface Elements in an Application
     General Design of a Palm Application
     How the Sample Applications are Useful
     User Interface of the Sales Application
     Developing a Prototype
     Design Trade-offs in the Sample Application
     Designing for a Small Screen
     Designing the Databases
     Designing the Conduit
     Design Summary

II. Designing Palm Applications

4. Structure of an Application
     Terminology
     A Simple Application
     Scenarios
     Memory is Extremely Limited
     Other Times Your Application is Called
     Summary

5. Forms and Form Objects
     Resources
     Forms
     Form Objects
     Resources, Forms, and Form Objects in the Sales Application

6. Databases
     Overview of Databases and Records
     Creating, Opening, and Closing Databases
     Working With Records
     Examining Databases in the Sales Sample

7. Menus
     Menu User Interface
     Menu Resources
     Application Code for Menus
     Adding Menus to the Sample Application

8. Extras
     Tables
     Tables in the Sample Application
     Find
     Beaming
     Barcodes

9. Communications
     Palm OS Communication Types
     Serial
     TCP/IP

10. Debugging Palm Applications
     Using the Palm OS Emulator (POSE)
     Device Reset
     Graffiti Shortcut Characters
     Source-Level Debugging with CodeWarrior
     Source-Level Debugging with GNU PalmPilot SDK
     Using Simulator on Mac OS
     Gremlins

III. Designing Conduits

11. Getting Started with Conduits
     Overview of Conduits
     Registering and Unregistering a Conduit
     Conduit Entry Points
     The HotSync Log
     When the HotSync Button Gets Pressed
     Using the Backup Conduit
     Creating a Minimal Sales Conduit

12. Uploading and Downloading Data with a Conduit
     Conduit Requirements
     Where to Store Data
     Creating, Opening, and Closing Databases
     Downloading to the Handheld
     Uploading to the Desktop
     When the HotSync Button Gets Pressed
     Portability Issues
     The Sales Conduit

13. Two-way Syncing
     The Logic of Syncing
     The Conduit Classes
     Sales Conduit Sample Based on the Classes
     Generic Conduit
     Sales Conduit Based on Generic Conduit

14. Debugging Conduits
     HotSync Flags
     Source-Level Debugging
     Avoiding Timeouts While Debugging
     Conduit Problems You Might Have
     Test with The Palm OS Emulator (POSE)
     Turn off Other Conduits During Testing
     Use the Log, Luke

A. Where To Go From Here

Index

   
Slashdot Log In
Nickname:

Password:

Public Terminal

[ Create a new account ]

 
This discussion has been archived. No new comments can be posted.
Review:Palm Programming - the Developer's Guide | Log in/Create an Account | Top | Search Discussion
Threshold:
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.