| Oracle9i Lite Developer's Guide for Palm Release 5.0 Part Number A90105-01 |
|
This document provides an overview of the Oracle9i Lite Developer's Guide for Palm. Topics include:
The Oracle9i Lite Mobile Development Kit for Palm includes:
Using the Mobile Development Kit for Palm, you can deploy your enterprise data and applications to distributed, mobile platforms. The data on the devices is stored in an Oracle Lite database object-relational database specifically designed for each platform. Once deployed, Oracle Lite database is transparent to the end user, and requires minimal tuning or administration.
Oracle Lite database is a small footprint, Java-enabled, relational database created specifically for laptops, handheld computers, PDAs, and information appliances. The Oracle Lite database runs on Windows 95/98/NT/2000, Windows CE/Pocket PC, Palm Computing, and EPOC. Oracle Lite database provides ODBC and OKAPI programming interfaces to build database applications from a variety of programming languages such as C/C++, Visual Basic and Satellite Forms. These database applications are capable of use while in a disconnected state.
The Mobile Sync Client is a small footprint application that resides on the mobile device and has inherited functionality formerly performed by the Replication API and IConnect Consolidator. Mobile Sync Client enables you to synchronize data between handheld devices and Oracle databases. Mobile Sync Client runs on Windows 95/98/NT, Windows CE/Pocket PC, Palm Computing, and EPOC.
There are several components included:
Typically, the handheld device needs to carry only a small subset of the data contained in a central database. For example, the sales force in a particular region only needs access to the contact information for customers in that region. Mobile Server uses a publish/subscribe model for managing data and applications. In this model the publication, which you create using the Mobile Server Admin API, defines the subset of data that you make available to particular subscribers. A subscription associates a user with a publication. As the client and server exchange data through synchronization, Mobile Server detects and resolves data conflicts using rules that you define and creates snapshots of the publication item for use on the client.
Mobile SQL allows you to create, access, and manipulate Oracle Lite database on Palm Computing Platform devices. Using Mobile SQL you can:
Several sample application are included in the Mobile Development Kit. Samples are not installed automatically with the Mobile Development Kit but they can be applied by executing a post-installation talk. See the Oracle9i Lite Installation and Configuration Guide for instructions on how to install the samples.
The Mobile Server provides seamless synchronization between Oracle Lite databases on handheld devices and Oracle servers.
Using a publish/subscribe model for data distribution, the Mobile Server enables individual client devices to subscribe to different subsets of data based on parameters such as user ID or location.
Mobile Server supports the Oracle Lite database on Palm Computing devices. Additionally, for the Palm Computing Platform, it supports:
The Mobile Server supports multiple transport protocols between handheld devices and servers, including:
Mobile Development Kit for Palm Computing devices supports version 3.5 of the Palm Operating System.
Mobile Development Kit for Palm provides the following development interfaces:
Open Database Connectivity (ODBC) is a call-level interface for accessing SQL databases. Oracle Lite database for the Palm Computing Platform supports a subset of the ODBC 3.0 interface. See Appendix C, "ODBC Support", for more information.
The Oracle Lite Object Kernel API (OKAPI) is a C++ language, object database interface that gives applications access to the functionality of Oracle Lite's object kernel. You can develop Oracle Lite OKAPI programs with the development tools appropriate for the target platform, such as CodeWarrior for the Palm Computing Platform. See Chapter 5, "Programming Palm Applications", for more information. Also, see the Oracle 9i Lite Object Kernel API Reference for complete Oracle Lite OKAPI information.
This API allows the application to programmatically control the replication process. The application invokes Mobile Sync Client API functions to initiate the replication process and captures error messages generated by the Mobile Sync Client API.
This section provides an overview of the Mobile Development Kit for Palm development process. The process includes the following steps:
To start developing with the Mobile Development Kit you need install and configure several components on a development system which runs under Windows:
For more information on installing and configuring the server and development environment, see Chapter 2, "Configuring the Development System".
The following techniques can be used to create publication items which automatically create tables on the mobile database when synchronization occurs. The three options for creating publication items are:
This method takes advantage of a part of the Mobile Server called the Packaging Wizard. No programming is required because a publication item is automatically created when publishing the application on to the Mobile Server repository. The developer then needs to execute a synchronization process which automatically creates the mobile database publication item objects such as tables and indices based on the snapshot (data subset) information provided to the Packaging Wizard. This graphical tool is used to package and publish an "application" which contains snapshot definitions into the Mobile Server repository. Mobile Server creates the necessary replication environment to synchronize data even if no application information other than the snapshot has been implemented.
The convenience of a graphical too is a safer and less error prone technique for developers to create mobile database. It requires the following steps to be executed before actual application programming begins:
The Mobile Server architecture has been designed to allow a centralized server to be used to manage and deploy mobile applications. This documentation provides a step-by-step approach in Chapter 6, "Using the Packaging Wizard".
The second way to create a database and populate data is to create a publication item programmatically using the Mobile Server Admin API. A publication item includes data replication objects such as publications and subscriptions. A database schema must exist before the Mobile Server Admin API can be invoked. Three basic steps are required to create a distributed database schema:
Publications are template groups containing metadata such as table subsetting definitions and indexes. You can create publications using the the Mobile Server Admin API. This API contains Java functions that implement the publish/subscribe model. You can call the functions in these APIs from within Java programs as standard function calls.
A publication item is a SQL select statement that specifies which data subset a client can access. A publication item usually corresponds to a replica table on the client device. You can create publication items using the Mobile Server Admin API. This API contains Java functions that implement the publish/subscribe model. You can call the functions in this API from within Java programs as standard function calls.
Each client is identified by a user ID. For development purposes, a user ID must be created using the Mobile Server Admin API in order to assign data subscriptions to a particular user.
Subscription links a user to a publication. You can create subscriptions using the Mobile Server Admin API. This API contains Java functions that implement the publish/subscribe model. You can call the functions in this API from within Java programs as standard function calls. To create publications and subscriptions using Java, see Chapter 3.3, "The Publish and Subscribe Model".
|
Important: Creating publication items programmatically requires enhanced skills in Java and the Mobile Server Admin API and is therefore more labor intensive. Oracle always recommends using the Packaging Wizard described in Chapter 6, "Using the Packaging Wizard", which requires more steps, but is more user friendly. |
A third way to create an Oracle Lite database is to use SQL. There are several tools bundled with Mobile Development Kit which can be used to manually create a basic database and insert some kinds of data. Mobile SQL is an application which can be used for this purpose. See Appendix B, "SQL Support" for more information.
The developer using this technique must make sure that the snapshot definitions provided later using the Packaging Wizard match the manually created table definitions exactly. This requires particular care in defining the snapshot information, should the snapshots created during replication not match the manually created table definitions, an application error will occur.
The third step in the development process is to replicate the data which creates an Oracle Lite database on the development system. The Mobile Development Kit for Palm Computing device runtime libraries need to be installed before replication can be executed.
Once you configure the transport between Mobile Server and the Palm OS Emulator, you must configure and install the Mobile Sync Client on the Palm OS Emulator. Also, you must enter and save user and connection parameters on the emulator before you can synchronize with the Mobile Server.
For instructions on configuring and installing, see Section 3.5, "Setting Up the Palm OS Emulator".
|
Note: You should develop your application using a Palm Computing Platform emulator. Emulators are "virtual" devices which enable you to develop and test your device applications on the desktop. |
The fourth step involves the first replication cycle where data from the Oracle database server is replicated to the Oracle Lite database residing on the development system. The Palm OS Emulator simulates a Palm Computing Device on a Windows machine which makes it more convenient to monitor and test data replication. A sample Oracle Lite database is created on the Windows development system when you install the sample files included with the Mobile Development Kit.
For more information on installing the sample files, see the Oracle9i Lite Installation and Configuration Guide. For instructions on configuring and installing the emulator, see Chapter 3, "Synchronization".
The fifth step in the development process is the application development. After you synchronize to create snapshot data on the Palm OS Emulator, you develop your application on the Windows development system (PC) using some form of Palm IDE. You should test your Palm application using the Palm OS Emulator before trying to deploy and run the application on a Palm Computing device.
See Chapter 5, "Programming Palm Applications", for information on developing your application.
The sixth step in the development process is to test the application on the actual Palm Computing handheld device. Testing a Palm application on the device requires the developer to manually perform installation and configuration task. The developer would use Palm Install Tool to manually install runtime and application libraries on the Palm Computing device. However, a more convenient way to install runtime and application libraries will be discussed in the "Oracle9i Lite Publishing, Management and Deployment Guide".
After you develop and test your Palm Computing application, you need to package the application. The Packaging Wizard enables you to create a self-contained package which includes application files and the Application Deployment Descriptor. The Mobile Server administrator uses the package to publish the Palm Computing application into the Mobile Server Repository.
For instructions on using the Packaging Wizard, see Chapter 6, "Using the Packaging Wizard".
|
|
![]() Copyright © 2001 Oracle Corporation. All Rights Reserved. |
|