Skip Headers

Oracle9i Lite Developers Guide for Windows CE
Release 5.0.1
Part No. A95913-01
Go To Table Of Contents
Contents
Go To Index
Index

Previous Next

1
Overview

This document provides an overview of developing applications with Mobile Development Kit for Windows CE, including requirements, product components, and installation procedures. Topics include:

1.1 Introduction

This release of Oracle Lite database runs on Windows CE 2.0 (and higher) devices. With Oracle Lite, enterprise applications using standard SQL can run on Windows CE with automatic data synchronization with enterprise servers.

Oracle Lite database on Windows CE offers a standard ODBC or JDBC interface. With data replication, distributed users have access to a lightweight database that synchronizes with Mobile Server. Oracle Lite database for Windows CE supports synchronous bi-directional replication using subquery snapshots. Subquery snapshots allow you to easily define the subsets of data that are needed by each remote or disconnected device. For more information on subquery snapshots, see Chapter 2.

Oracle Lite database for Windows CE supports replication with Mobile Server over Ethernet, wireless, modem, and serial connections using one of the following transport mechanisms:

SQL*Net and Oracle Net8i replication are currently not supported.


Note:

The Oracle Lite database for Windows CE database files are compatible with the Oracle Lite database files (.ODB files) on the desktop. You can copy database files from one environment to the other. ActiveSync may be used to copy files.

Additionally, you can store Oracle Lite database for Windows CE database files (.ODB files) on flash memory for extra storage, however accessing Oracle Lite database directly from flash memory is not currently supported.


1.1.1 Supported Windows CE Operating Systems

Oracle Lite for Windows CE currently supports the Pocket PC 3.0 operating system also known as PocketPC 2000, PocketPC 2002, and the HandheldPC Pro (HPC Pro), which is also referred to as the HandheldPC 2000 operating system (corresponding to Windows CE 2.11).

1.1.2 Mobile Development Kit Directory Structure

Files for Windows CE in the Mobile Development Kit are distributed based on the following structure:

<Form Factor>\<Language>\<Chipset>

where:

  • Form Factor stringname - "Pocket PC" or "HPC Pro."

  • Language - One of the supported languages.

  • Chipset - One of the supported chipset types.

1.1.2.1 Supported Languages

Oracle Lite for Windows CE supports the following languages:

Table 1-1 Supported Languages and Subdirectory Descriptors

Language Subdirectory Descriptor
US English us
Japanese ja
Chinese cn
Korean ko
Taiwanese tw

1.1.2.2 Supported Chipsets

Oracle Lite for Windows CE supports the following chipsets and form factors:

Table 1-2 Supported Chipsets and Subdirectory Descriptors

Chipsets Pocket PC HPC Pro Subdirectory Descriptor
SH3 Yes Yes sh3
SH4 No Yes sh4
MIPS Yes Yes mips
ARM Yes Yes arm
X86 No No x86

1.2 Application Development

Applications for Windows CE devices are most often developed and tested first on the desktop, and then downloaded to the device for further testing.

1.2.1 Oracle Lite Utilities

You can use other Oracle Lite database tools and utilities on the Windows CE device, including:

  • CREATEDB

  • REMOVEDB

  • ODBINFO

  • ENCRYPDB

  • DECRYPDB

  • Mobile SQL (MSQL)

See the Appendix B for more information on these utilities.

1.2.2 Development Tools

Mobile Development Kit for Windows CE is certified for development using the following development tools:

  • Visual C++ version 6.0 (for Windows CE)

  • Visual Basic version 6.0

  • Microsoft Embedded Visual Tools version 3.0.

Microsoft Embedded Visual Tools allows development applications in both C++ and Visual Basic, and is required to create native applications for Pocket PC.

1.2.3 Development Interfaces

Oracle Lite applications can be developed under several different interfaces.

1.2.3.1 JDBC

The Java Database Connectivity (JDBC) interface specifies a set of Java classes that provide an ODBC-like interface to SQL databases for Java applications. JDBC, part of the JDK (Java Developer's Kit) core, provides an object interface to relational databases. Oracle Lite database supports JDBC through an Oracle Lite database, Type-2 JDBC driver that interprets the JDBC calls and passes them to Oracle Lite database. The Mobile Development Kit requires JDK version 1.3.1.

Figure 1-1 Java Development Model

Description of msync3.gif is contained in the surrounding text

For more information see the Oracle_Home\Mobile\SDK\Examples\Java directory.

1.2.3.2 ODBC

Windows CE does not support the ODBC driver manager. To use Oracle Lite database as the database in your Visual C++ ODBC applications, you need to:

  • Install Microsoft Embedded Visual Tools 3.0 or Microsoft Visual C++ 6.0 and the Windows CE Toolkit for Visual C++.

  • Use the compile-time flag -D SQL_NOUNICODEMAP while building your application.

  • Link your application with the olod2040.LIB library from the Oracle_Home\Mobile\SDK\wince\platform\Lib directory. (platform is MIPS or SH-3.)

Figure 1-2 ODBC Development Model

Description of msynch2.gif is contained in the surrounding text

1.2.3.3 Object Kernel API (OKAPI)

OKAPI is the application programming interface (API) to the Oracle Lite object kernel. OKAPI includes support for the following database features:

  • run-time class creation and access to class information

  • direct object access based on object identity and navigation

  • object clustering and grouping

  • queries on classes and their subclasses

  • object naming and inter-object relationships

  • binary large object (BLOB) data

  • transaction and crash recovery

For more information, see the Oracle Lite Object Kernel API Reference.

1.2.3.4 Mobile Sync API

This API allows the application to programmatically control the replication process. The application invokes Mobile Sync API functions to initiate the replication process and captures error messages generated by the Mobile Sync API. The Mobile Sync API supports COM, Java, and native C applications. See Section 2.5 for more information.

1.2.3.5 Active Data Objects for CE (ADOCE)

ActiveX Data Objects is a programming interface which enables applications written in high level languages, such as Visual Basic, to access Oracle Lite database functionality. For more information on this development interface, see Chapter 3.

Figure 1-3 Active Data Objects Development Model

Description of msynch1.gif is contained in the surrounding text

1.3 Development Process

This section provides an overview of the Mobile Development Kit for Windows CE development process. The process includes the following steps:

  1. Configuring the Development System

  2. Publication Item Creation

  3. Setting Up the Windows CE Device

  4. Replication with the Windows CE Device

  5. Developing Mobile Applications for Windows CE

  6. Testing on the Device

  7. Application Packaging

1.3.1 Configuring the Development System

To start developing with the Mobile Development Kit you need install and configure several components on a development system which runs under Windows:

  • Mobile Server

  • Mobile Development Kit

  • Integrated Development Environment (IDE) for Windows CE

    • Microsoft Visual C++ version 6.0 and Windows CE Toolkit for Visual C++, or,

    • Microsoft Embedded Visual Toolkit version 3.0.

For more information on installing and configuring the server and development environment, see Section 2.8, "Configuring RAS Transport".

1.3.2 Publication Item Creation

The following techniques can be used to create publication items which automatically create tables on the mobile database when synchronization occurs. The options for creating publication items are:

  1. Creating a Publication Item Declaratively - Create publication items using the Packaging Wizard. This is the recommended method.

  2. Creating the Publication Item Programmatically - Create a publication item programmatically using the Mobile Server Admin API.

1.3.2.1 Creating a Publication Item Declaratively

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:

  • Packaging the Application

  • Create the Database in the Oracle Database Server

  • Publishing the Application into the Mobile Server Repository

  • Setting Up Mobile Client

  • Deploying Application and Data

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 4.

1.3.2.2 Creating the Publication Item Programmatically

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:

  • Creating a Publication

  • Creating a Publication Item

  • Create User ID

  • Creating a Subscription


Creating Publications

Publications are template groups containing metadata such as table subsetting definitions and indexes. You can create publications using the Mobile Server Admin API. This API contains Java functions that implement the publish/subscribe model. You can call the functions in these APIs in Java programs as standard function calls.


Create a Publication Item

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.


Creating User ID

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.


Creating Subscription

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 Section 2.3.


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 4, which requires a step-by-step approach, but is more user friendly.

1.3.3 Setting Up the Windows CE Device

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 Windows CE device runtime libraries need to be installed before replication can be executed.

Once you configure the transport between Mobile Server and the Windows CE device, you must configure and install the Mobile Client. Also, you must enter and save user and connection parameters on the device before you can synchronize with the Mobile Server.

For instructions on configuring and installing, see Section 2.7 or Section 2.8.

1.3.4 Replication with the Windows CE Device

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. 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.

1.3.5 Developing Mobile Applications for Windows CE

The fifth step in the development process is the application development. After you synchronize the server data on the device, you develop your application on the Windows development system (PC) using some form of Windows CE IDE. You should try to test your Windows CE application using the device before trying to deploy and run the application on a Windows CE device.

See Section 1.2.2 and Section 1.2.3, for information on development tools and interfaces.

1.3.6 Testing on the Device

The sixth step in the development process is to test the application on the actual Windows CE Computing handheld device. Testing a Windows CE application on the device requires the developer to manually perform installation and configuration task. The developer would use ActiveSync to manually install runtime and application libraries on the Windows CE Computing device. However, a more convenient way to install runtime and application libraries will be discussed in the Oracle9i Lite Admin Guide.

1.3.7 Application Packaging

After you develop and test your Windows CE 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 synchronization logic. The Mobile Server administrator uses the Packaging Wizard or the Control Center to publish the Windows CE Computing application into the Mobile Server Repository.

For instructions on using the Packaging Wizard, see Chapter 4.

1.4 Limitations

This release has the following limitations:


Previous Next
Oracle Logo
Copyright © 2002 Oracle Corporation

All rights reserved
Go To Table Of Contents
Contents
Go To Index
Index