The Conduit Classes
You may be apprehensive about tackling two-way syncing using the conduit classes provided by Palm (sometimes called basemon and basetabl because of the filenames in which they are located). The implementation may seem murky and the examples quite complicated. If you looked over the samples, you certainly noted that there is no simple example showing how to do what you want to do. Things get even more formidable if you don’t want to save your data in the format the base classes provide.
We had all these same apprehensions—many of them were well deserved. At the time this book was written, the documentation wasn’t clear concerning the definitions and tasks of each class, nor was it clear what you specifically needed to do to write your own conduit (what methods you are required to override, for instance). The good news is that a detailed examination shows that the architecture of the conduit classes is sound; they do quite a lot for you, and it’s not hard to support other file formats once you know what you have to change.
After diving in and working with the conduit classes, we figured out how to use them effectively. In a moment, we will show you their architecture and describe each class and its responsibilities. After that, we show you what is required on your part—what methods you must override and what data members you must set. Next, we show you the code for a complete syncing conduit that supports its own file format.