| qof_book_merge: 'Query Object Framework: Design and direction.' | ||
|---|---|---|
| Prev | Chapter 4. Creating GnuCash Invoices using a Palm PDA | Next |
Pilot-QOF is an application to use QOF with pilot-link which provides access to Palm application data. Pilot-QOF currently provides access to Expenses, ToDo (Tasks), Contacts (Addressbook) and Appointment (Datebook/Calendar). It can be extended to provide access to data in ANY Palm application. Naturally, it is considerably easier to add open source Palm applications like FreeCoins or PCash. Proprietary Palm applications can also be supported, depending on cooperation from the proprietary developers to provide details of the relevant database structure for the user data created by the application.
QOF frees the data from the application, allowing queries, data mining, abstraction and data interchange without having to recompile the original application, let alone program the filters. Central to QOF are the ideas of databases and objects. A Palm database is an object in QOF. A Palm database record is an instance of the object, called an Entity. QOF then collates all supported objects to form one data source that can be queried. QOF allows the programmer to easily find all other instances of any one type, just by having one instance of that type. Objects are collected in books and a book can contain any number of different objects - depending on the application running QOF. The book is the central data source within QOF and a book can be queried or written out to XML using the QOF Serialisation Format: QSF.
In real terms, QOF will be running as a framework around the libpisock library from pilot-link so the offline storage, (QSF XML), will be written by pilot-qof. Pilot-link itself does not directly support users who cross timezones with their Palm - it may be wise that users are reminded that if timezone issues are important to their DateBook or Expenses data, the user should take the sensible precaution of changing the Palm Preferences to use the same timezone as the computer running pilot-qof. Once in QOF, all dates and times are UTC so the QSF XML files can be freely exchanged across timezones without complication.
To explain how Pilot-QOF works, the manpages are reproduced in the next section.
New objects are needed to extend Pilot-QOF to other Palm applications or to create new objects for other applications like GnoTime, GnuCash or into completely new areas. To take the tedium out of object creation, QOF-generator was created. Two methods are currently supported:
HTML & PHP: Using standard WWW methods, parameters can be added in a series of forms. This provides an intuitive and simple method - provided that the PHP can be hosted on a webserver.
XML & Perl: This method converts any QSF XML file into the QOF object(s) that are described in the XML. This can be used to re-create an application from incoming data (although the application still needs to be compiled). By hand-editing the XML, applications can be built that combine objects from disparate sources, providing a simple means of interchanging data. Or by altering existing XML for your own ends, entirely new objects can be created and a new application created to handle the data.
The applications built using QOF-generator are based on Pilot-QOF as command-line utilities that provide query functionality and XML storage. The objects themselves can be re-used in any other QOF application - all that needs to change are the links between the objects and the rest of the application. This means that an application that already handles QOF objects is easily extended with new objects - an inherent advantage to using QOF for application data.