60 likes | 162 Views
Keeping It in Sync. HotSync®-ing Palm® Programs, Java Style by Mike Kirschman. The Palm® Model. Do minor processing on the handheld. Minor data entry Data display (often only a subset of data) Small remote database queries (if capable) Etc. Do major processing on PC/Laptop
E N D
Keeping It in Sync HotSync®-ing Palm® Programs, Java Style by Mike Kirschman
The Palm® Model • Do minor processing on the handheld. • Minor data entry • Data display (often only a subset of data) • Small remote database queries (if capable) • Etc. • Do major processing on PC/Laptop • Large data entry • Extended processing • Internet (though, some appearing on HH) • Larger database queries.
The Conduit: Bridging the Gap • Once the processing is done on the HH or PC, the other needs to be updated of the data changes. The vehicle for these changes is the Conduit. • The coding options presented in the Palm OS® Conduit Development Kit (CDK): • C++ • Java • Com
Java Conduits • Overall Design • Read HH data to PC (HotSync®) • Read PC copy of data into conduit (see diagram ) • Read PC data • Determine type of sync necessary: • HH PC • HH PC • HH PC • Write data to HH or PC as necessary gnt.GNTConduit 1 Request DB Open palm.conduit.SyncManager (opens HH database) gnt.GNTOptions 2 Read this Record 3 ReadOptions gnt.GNTRecord 4 Read this File gnt.GNTConduit 5 Repeat for each file (known by options) (Left for a later time)
Data Stream to Read Text Database, Record 0 File 1 Boolean editable Boolean compressed UInt16 recNum UInt16 numGraphics UInt16 category Char[65] name File N Boolean editable Boolean compressed UInt16 recNum UInt16 numGraphics UInt16 category Char[65] name Options UInt16 openFile UInt16 openGraphic UInt16 numRecs UInt32 optionsRecSize … Text Database, Record j Є {1..N} Char[] fileText
More Information • Palm OS® Development:http://www.palmone.com/us/developers • Other Palm Resources:http://ardiri.com(look for Palm Development Kit, PilRC, & jCode) • Conduit Development:http://www.palmos.com/dev/tech/conduits • IDE-based development:http://www.metrowerks.com/MW/develop/Wireless/PalmOS/Professional/