Type Your Title Here - Oracle



Occasionally Connected Computing: Bringing Handheld, PDAs and Smart phones into the Enterprise

Martin Graf, Oracle Corporation

Introduction

Even at the height of the mobile Internet hype it was already apparent that value would be found first and best in the enterprise, in the way that mobile technologies that were increasingly cheap, easily deployed and standardized could make a workforce more productive and flexible when away from the office. The success of Oracle9iAS Wireless has proven that a well-designed, effectively implemented mobile technology with real business relevance can indeed be valuable. The value of mobile is in liberating enterprises from the confines of information technology that stops at the office or warehouse door.

Wireless network provide a wide spectrum of voice and data services for mobile professionals who depend on real time (online) information access from the mobile device, anytime, anywhere. However the online model requires an always-on network connection, which for several reasons does not prove economically viable or simply technically not doable. Usability of wireless applications is severely limited by network bandwidth, which is still lacking in both coverage and data transmission capacity despite the rollout of GPRS and 3G networks. In the meantime, wireless device vendors started to produce a new generation of powerful, yet simply to use smart phones such as Nokia 9290 or so called hybrids such as Handspring’s Trio. The logic behind this development is to use the increased processing power and non-volatile storage is of course not just to run a micro browser but to facilitate a new avenue of commercial business application that use best of both world. Local processing power is used to render advanced application logic and data in case real-time access is not needed (or not feasible) and on the other hand the always-on network for instant Internet access. This distributed computing model allows the mobile professional to cost-effectively use the same device to conduct business transactions as well as personal information management.

A third category of intelligent wireless clients is about to emerge closing the gap between the two more traditional extremes of always on-line and always off-line mobile system. This paper describes two Oracle products, which facilitates development, deployment, and management of intelligent wireless applications. The developer will learn the basic concepts and system architecture components as will as the steps required to build and deploy mobile off-line applications.

What is Occasionally Connected Computing (OCC)

Occasionally connected computing is defined as the ability to execute business transactions on a mobile device without a network connection. Several different computing models evolved over the last couple of years trying to address the increasing demand of disconnected computing. It is important to understand the basic concepts of each model before we can dive into the different technology solutions.

Disconnected database Application

The first model evolves around the assumption that a mobile client is generally disconnected from the network. A usage model commonly used by consumers and mobile professionals using a Personal Digital Assistant (PDA) such as Compaq iPAQ, Palm Computing, or one of the Linux powered devices like the Sharp Zaurus. These devices do have build in network connectivity but PIM applications are essentially designed to use in off-line mode. There is no need to connect a Palm device to update the address book or to make an entry into the calendar. However, the build in TCP/IP stack makes it easy to connect the PDA device with the Internet to synchronize the local PIM data with a corporate PIM server such as MS Outlook. Network usage is limited to those few times a day where data needs to be refreshed and synched up with a global database. Business applications such as Sales force Automation, Field Service Automation, or more generally Data Collection application share the same model as with PIM application by means that mobile professional use the device to collect information while disconnected from the network. The network is subsequently used to transport the temporarily stored local data to the corporate database, but by no means required to execute the application logic. PIM applications use the native file storage where a RDBMS (SQL database) proved to be the choice for business application, which are usually more data intensive. Basic RDBMS features such as commit/rollback, transaction isolation, search capability, and generally the SQL language come in handy for corporate developers which are already familiar with database technology, particularly with Oracle database server. The most commonly used programming languages are C/C++, Visual Basic, Java, or any other popular development tool such as Sybase Powerbuilder or Borland Delphi as long as the tool support ODBC or JDBC database access. Developers use the native graphical libraries (PalmOS, Windows, Symbian) or even AWT/Swing for Java application to build sophisticated, rich UI client application. Each application utilizes device specific facilities such as operating system graphic libraries or file system access. This makes it impractical to run the same application on a different device since OS and UI specific logic must be rewritten for each device. Data synchronization is used to upload data onto a corporate database while receiving a new set of data from the master database at the same time. The client database holds a small subset of the corporate database, hence forming a distributed database model referred as Master/Slave replication. Each snapshot in the slave database is a copy of a base table stored in the master database. These two databases form a loosely coupled system with a replication engine mediating database synchronization between the two databases.

The table below lists the properties of the first computing model:

|Data Store |SQL |

|Network usage |Mostly Offline (80%) |

|User Interface |Native |

|Distributed Model |Master/Slave Replication |

|J2EE Compliance |No |

|Delivery Model |Single Channel/Single Device |

|Device |Laptop, PDA |

This proven model is highly respected by corporate IT departments since it is based on popular, established IT technologies. Thousands of production systems with thousands of mobile professionals use laptop and industrial handheld computer for their daily business. Numerous vendors offer scalable, reliable infrastructure software to build, deploy, and manage mobile application.

Oracle9i Lite evolved over the last six years from a tiny little database to a complete, integrated infrastructure platform facilitating development, deployment and management of scalable and secure business application for corporate business professionals. Over 2000 customers with more than 500’000 users rely on Oracle9i Lite technology as the foundation of their mobile IT environment. We are going to discuss the concepts and software components of Oracle9i Lite in more detail later, but for now we are going to elaborate on a different offline model introduced with the next version of Oracle9iAS Wireless.

Disconnected J2EE Application

The disconnected database model (also referred as ‘native’ model) takes the mobile device as the development platform, which is a more advanced form of client/server programming. This model proved to me less applicable because it does not factor in the existence of a wide range of different mobile devices, each distinctly different from each other by means of firm ware, display size, connectivity, and storage capacity. A disconnected database application runs perfectly for the device it has been designed for but runs poorly or not at all on a different form factor or different operating system. Not even Java’s “develop once, run everywhere” paradigm seems to be applicable for small devices which is probably why one has not seen large scale business application deployed to PocketPC, PalmOS, or Symbian devices. The future will tell if J2ME is able to make an inroad on this fundamental flaw of the Java computing model.

Oracle9i Application Server Wireless decided to take another, more promising approach of bringing seamless offline capability to J2EE application. The basic philosophy is that a J2EE developer should focus on the business logic, relying on a mobile infrastructure, which automatically delivers the application content to any wireless device, including downloading the application logic and data onto the device itself without changing the application code. Mobile applications then are no longer a special category of Web application but every J2EE application so to speak ‘inherits’ mobile capability for free. O9iAS Wireless 9.0.4 introduces a new feature, which allows XHTML/XForms application to run in offline mode. The main building blocks a new XClient stack features an XForm engine, a communication manager, and a persistent engine (not necessarily a RDBMS) to store and execute XHTML/XForms application and data. The properties of this second model are listed below:

|Data Store |Non SQL |

|Network usage |Mostly Online (80%) |

|User Interface |Browser |

|Distributed Model |XML/DOM |

|J2EE Compliance |Yes |

|Delivery Model |Multi Channel/Multi Device |

|Device |Laptop, PDA, Pager, WAP |

This paper does introduce the development concepts and architecture components, which should allow the reader to assess this new exiting technology. However not all implementation details can be exposed at this time due to the early stage of development. Please visit for updates and more detailed information.

Chapter 1

Building a Disconnected Database Application using Oracle9i Lite

Oracle9i Lite facilitates the development, deployment, and management of offline mobile database applications for a large number of mobile users. An offline mobile application is an application that can run on mobile devices without requiring constant connectivity to the server. An offline database application requires a local database on the mobile device whose content is a subset of the data stored in the enterprise data server. The modifications made to the local database by the application are occasionally reconciled with the server data. The technology used for reconciling changes between the mobile database and the enterprise database is known as data synchronization.

Offline mobile database applications can be developed in many ways. The most common way is to develop native C or C++ applications for specific mobile platforms. The applications can access the database using either the Open Database Connectivity (ODBC) interface, Active Data Object (ADO), or some other interface built on top of ODBC. Another way to develop an offline mobile database application is to use Java and the Java Database Connectivity (JDBC) interface.

Oracle9i Lite also offers a third way to develop offline mobile database applications: browser-based Web applications called Web-to-Go. Web-to-Go applications can be developed using either the Java Servlets/Java Server Pages. Oracle9i Lite product contains a lightweight Web listener and a Servlet engine that runs on mobile clients, such as laptop computers, that supports a Java VM. This paper presents the overview of the Oracle9i Lite concepts and tools and discusses the development and deployment of native, Java, and Web offline database applications using Oracle9i Lite Mobile Development Kit.

Oracle9i Lite Concepts and System Architecture

There are three main concepts that needs to be understood by the developer:

Application Concept

Data Concept

User Concept

APPLICATION CONCEPT

An application in a Mobile Server context is an abstract object (container) with properties and a set of methods. An application object is created when an application is published (deployed) into the Mobile Server Repository. Mobile Server maintains the context of an application objects and any references to the object. The most important application properties are:

Name

Description

Display icon

Database name

Snapshot definition

Resource files

An application is a manageable entity, which allows the administrator to provision and manage application from a centralized administration application called Mobile Server Control Center. An application must be published (deployed) into the Mobile Server Repository in order for the administrator to perform administrative tasks such as drop/suspend an application or change the application description. The Control Center therefore calls the application methods, which are listed below:

ListApplication

CreateApplication

DropApplication

SuspendApplication

SetApplicationName

Data Concept

An application object can (not a must) be affiliated with a one and only one data object called publication. Each Oracle9i Lite application defines its data requirements using a publication. A publication is akin to a database schema and it contains one or more publication items. A publication item is like a parameterized view definition; it defines a subset of data using a SQL query with bind variables in it. These bind variables are called subscription parameters or template variables. A subscription is a publication where every subscription parameter of every member publication item is given a value. A subscription is needed to provision an application to a user. It defines the data subset for a user.

When a user logs in to the Mobile Server for the first time, the Mobile Server creates an Oracle Lite database on the client machine for each subscription that is provisioned to that user. The Mobile Server then creates a snapshot in this database for each publication item contained in the subscription, and populates it with data retrieved from the server database by running the SQL query (with all the variables bound) associated with the publication item. Once installed, the Oracle Lite database is transparent to the end user; it requires minimal tuning or administration.

As the user uses the application, the snapshots capture changes made to the Oracle 9i Lite database. At a certain time when the connection to the Mobile Server is available, the user may synchronize the changes with the Mobile Server. Synchronization may be initiated by the user using the Oracle9i Lite Mobile Synchronization application (msync) directly, or by programmatically calling the Mobile Synchronization API from the application. The Mobile Synchronization application communicates with the Mobile Server and uploads the changes made in the client machine. It then downloads the changes for the client, which has been previously prepared by the Mobile Server.

A background process called the Message Generator and Processor (MGP), which runs in the same tier as the Mobile Server, periodically collects all the uploaded changes from many mobile users and then applies them to the server database. Next, MGP prepares changes that need to be sent to each mobile user. This step is essential because the next time the mobile user synchronizes with the Mobile Server, these changes can be downloaded to the client and applied to the client database.

User Concept

A user is an abstract entity with a set of privileges and roles. Users can be assigned to one of several groups. A user or group of users can be affiliated to one or multiple applications, which essentially grants them the privilege to execute the application. Since the mobile application is not execute on the server but on the mobile device, this basically causes the Mobile Server to deliver the application and its affiliated resource files to the mobile device. The corresponding data object (definitions) is downloaded to the mobile client as well in case a publication is assigned to an application. The ERR below depicts the relationship between these three objects:

It is paramount to understand these basic concepts before advancing into the development and deployment section.

Oracle9i Lite Components

Oracle Lite RDBMS

Oracle Lite RDBMS is a small footprint, Java-enabled, secure, relational database management system created specifically for laptop computers, handheld computers, PDAs, and information appliances. Oracle Lite RDBMS runs on Windows 98/NT/2000/XP, Windows CE/Pocket PC, Palm Computing, EPOC, and Embedded Linux. Oracle Lite RDBMS provides JDBC, ODBC, and an object-oriented interface called OKAPI programming interfaces to build database applications from a variety of programming languages such as Java, C/C++, and Visual Basic. These database applications can be used while the user is disconnected from the database server.

When you install the Mobile Development Kit, the Oracle Lite RDBMS and all the utilities are installed on your development machine. In a production system, when the Mobile Server installs Oracle9i Lite applications, only the RDBMS, the Mobile Sync, and Mobile SQL applications are installed on the client machine

Mobile SQL (MSQL)

MSQL is an interactive tool that allows you to create, access, and manipulate the Oracle Lite database on laptop and handheld devices. Using MSQL, you can do the following:

• Create database objects such as tables, and views

• View tables

• Execute SQL statements

MSQL is installed with the Mobile Development Kit installation. The Mobile Server as part of application installation also installs it. MSQL for the Windows 32 platform is a command line tool that is similar to Oracle’s SQL*Plus tool. MSQL for Windows CE and Palm supports a graphical user interface.

Mobile Sync (MSYNC)

Mobile Sync is a small footprint application that resides on the mobile device. Mobile Sync enables the application to synchronize data between handheld devices, desktop and laptop computers and Oracle databases. Mobile Sync runs on Windows 98/NT/2000/ME/XP, Windows CE/Pocket PC, Palm Computing, Symbian, and Embedded Linux. Mobile Sync synchronizes the snapshots in an Oracle Lite database with the data in corresponding Oracle data server. These snapshots are created by the Mobile Server for each user from the publication items associated with a mobile application. The Mobile Server also coordinates the synchronization process.

The Mobile Sync application communicates with the Mobile Server using any of the supported protocols (e.g., HTTP). When called by the mobile user, the Mobile Sync application first collects the user information and authenticates the users with the Mobile Server. It then collects the changes made to the Oracle Lite Database (from the snapshot change logs) and uploads them to the Mobile Server. It then downloads the changes for the user from the Mobile Server and applies them to the Oracle Lite database. In addition to this basic function, the Mobile Sync application can also encrypt, decrypt, and compress transmitted data.

Mobile Server

The Mobile Server is a mid-tier server that provides the following features:

• Application publishing/deploying

• Application provisioning

• Application management

• Data synchronization

• File distribution

Mobile Server has two major modules called the Resource Manager and the Consolidator. The Resource Manager is responsible for application publishing, application provisioning, and application installation. The Consolidator is responsible for data and application synchronization.

Application publishing refers to uploading your application to the Mobile Server so that it can be provisioned to the mobile users. Once you have finished developing your application, you can publish it to the Mobile Server by using the development tool called the Packaging Wizard.

Application provisioning is concerned with creating subscriptions for users and assigning application execution privilege to them. Application provisioning can be done in one of two ways:

Using the administration tool called the Control Center, you can create users and groups, create subscriptions for users by assigning values to subscription parameters, and give users or group’s privileges to use the application.

Using the Resource Manager API, you can programmatically perform the above tasks.

End users install mobile applications in two steps.

The mobile user, you browse the setup page on the Mobile Server and choose the setup program for the platform you want to use. The setup program only runs on Windows 32 platforms. For Windows 32 based client systems, you can download the setup program directly to the Windows 32 system and execute it to set up the Oracle9i Lite client. For Windows CE and Palm devices, you must download the setup program to your Windows 32 desktop first and execute it there. Then you must use ActiveSync for Windows CE or Hot Sync for Palm to install the Oracle9i Lite client on the device.

The mobile user runs Mobile Sync (msync.exe) application on the mobile device, which prompts the user for and password. The Mobile Sync application communicates with the Consolidator module of the Mobile Server and downloads the applications and the data provisioned to you.

After the installation of the applications and data, you can start using the application. Periodically, you will use Mobile Sync or a custom command to synchronize your local database with the server database. This synchronization will also update all applications that have changed.

Message Generator and Processor (MGP)

The Consolidator module of the Mobile Server uploads the changes from the client database to the server, and it downloads the relevant server changes to the client. But it does not reconcile the changes. The reconciliation of changes and the resolution of any conflicts arising from the changes are handled by MGP. MGP runs as a background process, which can be controlled to start its cycle at certain intervals.

Each cycle of MGP consists of two phases: apply and compose.

The Apply Phase

In the apply phase, MGP collects the changes that were uploaded by the users since the last apply phase and applies them to the server database. For each user that has uploaded his changes, the MGP applies the changes for each subscription in a single transaction. If the transaction fails, MGP will log the reason in the log file and stores the changes in the error file.

The Compose Phase

When the apply phase is finished, MGP goes into the compose phase, where it starts preparing the changes that need to be downloaded for each client.

Applying Changes to the Oracle Server Database

Because of the asynchronous nature of data synchronization, the mobile user may sometimes get an unexpected result. A typical case is when the user updates a record that is also updated by someone else on the server. After a round of synchronization, the user may not get the server changes.

This happens because the user’s changes have not been reconciled with the server database changes yet. In the next cycle of MGP, the changes will be reconciled with the server database, and any conflicts arising from the reconciliation will be resolved. Then a new record will be prepared for downloading the changes to the client. When the user synchronizes again (the second time), the user will get the record that reflects the server changes. If there is a conflict between the server changes and the client changes, the user will get the record that reflects either the server changes or the client changes, depending on how the conflict resolution policy is defined.

Mobile Server Repository

The Mobile Server Repository (the Repository for short) contains all the information needed to run the Mobile Server. The information is usually stored in the same database where the application data reside. The only exception to this is in the case where the application data reside in a remote instance and there is a synonym defined in the Mobile Server to this remote instance using database links.

Although you can use MSQL to work with the Repository, it should be restricted to browsing. Updates to the Repository should only be made by using the Mobile Server Control Center or the Resource Manager API of the Mobile Server.

Building a Mobile Database Application

Oracle9i Lite installation provides you with an option to install the Mobile Server or the Mobile Development Kit. For application development the Mobile Development Kit needs to be installed on the development machine. However, as we will discuss later in this document, the development examples require the Mobile Server to be running. The installation of the Mobile Server requires an Oracle database instance to be running. An existing test database can be used for this purpose.

Mobile Development Kit

Before you develop an offline application using Oracle9i Lite, you should install the Oracle9i Lite Mobile Development Kit on the machine on which you intend to develop your application. See Oracle9i Lite Installation and Configuration Guide for Windows NT/2000/XP for instructions on how to install the Mobile Development Kit.

The Oracle9i Lite Mobile Development Kit includes the following components:

• Oracle Lite Database: A lightweight, embedded, relational database management system

• Packaging Wizard: A tool to package and publish applications to the Mobile Server Repository

• Mobile Sync : A transactional synchronization engine

Using a development tool such as Microsoft Embedded Visual Tool or Metroworks CodeWorrior in conjunction with the Mobile Development Kit for Windows, you can develop your mobile database against an Oracle Lite database. You can also use Oracle JDeveloper or any Java IDE to build servlet based mobile offline application. The latter is also called “Web-to-Go” application.

The Mobile Development Kit is installed in /Mobile/SDK. The bin directory contains the development and runtime components that are common across native, Java, and Web-based applications. The components that are needed for a specific application type or platform are provided in the subdirectories under the SDK directory. For example, all the development and runtime components for Windows CE are provided in the wince subdirectory that contains a subdirectory for each chip set. The development and run time components specific for Web-to-Go applications are provided in the \wtgsdk subdirectory.

The Examples directory \Mobile\SDK\Examples contains some sample applications for Win32 native (C, C++, VB, etc) or Java. Each platform or application type subdirectory also contains examples for that platform or application type. The readme.txt file in each directory explains what the sample programs do and how to run them.

When you install the Mobile Development Kit, the installer sets the PATH environment variable to include the bin directory of the Mobile Development Kit. You can use the Command Prompt on your Windows 32 machine to do the following quick test. At the Command Prompt enter:

msql system/manager@jdbc:polite:polite

SQL>create table test (c1 int, c2 int);

Table created

SQL>insert into test values(1,2);

1 row(s) created

SQL>select * from test;

C1 | C2

----+----

1 | 2

SQL>rollback;

Rollback complete

SQL>exit

Development Interfaces

There are three types of interfaces that you may have to use to develop Oracle 9i Lite applications. They are:

Oracle9i Lite database access API

Client side data and application synchronization API

Optional: Mobile Server API

The Oracle9i Lite Database Access API

Oracle9i Lite supports ODBC and JDBC APIs to the database. Other APIs built on top of any of these interfaces are also supported. These include ADO and BC4J. The ODBC functionality supported on Windows32, Windows CE, Symbian, and Linux are identical. On PalmOS, only a subset of standard ODBC functionality is supported. The ADO CE interface on Windows CE/Pocket PC version is Oracle’s own implementation and does not use OLEDB.

Oracle9i Lite supports ODBC 2.0 Driver with the following conformance level:

ODBC API:

Level 2 API

(Except translation DLL)

ODBC SQL grammar (include ODBC SQL data types):

Extended SQL Grammar

(Except ABS scalar function, and batch SQL statements)

Oracle9i Lite also supports ODBC 3.51 with the following conformance level:

ODBC Interface:

Level 1 Interface Conformance with the following exceptions:

1. No support for bookmark.

2. No support for row-wise binding for parameter and binder.

3. No support for row count for SELECT statement in SQLRowCount.

SQL grammar:

SQL-92 Entry Level with Oracle’s extension.

The SQL language supported is highly compatible with Oracle 9i SQL language where the same language constructs are supported.

Oracle9i Lite JDBC driver conforms to JDBC 1.22 specification. In addition it implements some JDBC Oracle specific extensions and some JDBC 2.0 features. JDBC is supported on all platforms. Please check the Oracle9i Lite Installation and Configuation Guide to see which VMs are certified for each platform

Client Side Data and Application Synchronization API

Oracle9i Lite offers different API styles for the Mobile Sync API to initiate data and application synchronization programmatically and register a call back routine to monitor the progress of the synchronization process.

C/C++ programs can use the Mobile Sync C-API

Java programs can use the Mobile Sync Java-interface

Visual Basic can use the Mobile Sync COM-interface

Note: Mobile Sync API must not be used for Web-to-Go application, only for native (C/C++, VB, Forms) and native Java application.

For detailed step-by-step instructions on how to build native, Java, or Web based application see the Developer’s Guide for each platform on Oracle Technology Network

The Mobile Server API

The Oracle9i Lite Mobile Server is written in Java and provides a Java API that can be used to manage the Mobile Server programmatically. The Mobile Server API can be offers the following categories:

• Manage users. Create and delete users and groups and modify user and group properties.

• Manage applications. Create and drop applications and modify properties of applications.

• Manage Data. Create and drop data subsets and modify data subset definitions.

• Provision applications and data to users. Define data sub setting parameter values for individual users and assign application execution privileges to users.

• Manage the synchronization process. Inspect input, Output, and error queues, get performance data, and view trace files.

• Manage the Mobile server. Start and stop the Message Generator and Processor.

Deploying a Mobile Database Application

Once the application has been developed, it has to be deployed. Deployment of applications is concerned with setting up the server system so that end users can easily install and use the applications. The nerve center of the server system for Oracle9i Lite applications is the Mobile Server, which is where the mobile applications are deployed. Deployment consists of six major steps:

Designing the server system to achieve the required level of performance, scalability, security, availability, and connectivity. Oracle9i Lite provides tools such as the performance evaluation utility to tune the performance of data synchronization. It also provides benchmark data that can be used for capacity planning for scalability. Security measures such as authentication, authorization, and encryption are supported using the appropriate standards. Availability and scalability are also supported by means of load balancing, caching, and the transparent fail over technologies of Oracle9i Application Server (Oracle9iAS) and the Oracle9i database server. For more information about how to install and configure Mobile Server see online documentation on Oracle Technology Network

Packaging and Publishing the application to the server. This refers to installing all the components for an application on the Mobile Server. Oracle9i Lite provides a tool called the Packaging Wizard that can be used to publish applications to the Mobile Server. See chapter ‘Using the Packaging Wizard’ in the developer guide on how to use Packaging Wizard. The URL below is for Windows 32

Provisioning the applications to the mobile users. This includes determining which user gets which applications with what subset of data. Oracle9i Lite provides a tool called the Control Center to create users, grant them the privilege to execute applications, and define the data subsets for them, among others. You can also use the Java API to do provisioning. For more information see online documentation on Oracle Technology Network

Testing for functionality and performance in a real deployment environment. A mobile application system is a complex system involving many mobile device client technologies (such as, operating systems, form factors, and so on), many connectivity options (such as, LAN, Wireless LAN, cellular, wireless data, and other technologies), and many server configuration options. Nothing can substitute for the real life testing and performance tuning of the system before it is rolled out. Particular attention should be paid to tuning the performance of the data sub-setting queries used in the publication item definition, as it is the most frequent cause of performance problems.

Delivery involves installing the Oracle9i Lite client, the application code, and the initial database. Initialization is a two-step approach: 1. Install the runtime libraries using a Mobile Client bundles, 2. Instantiate the mobile database and replicate data and application files. The volume of data required to install applications on a mobile device for the first time could be quite high, necessitating the use of either a high-speed reliable connection between the mobile device and the server. Offline instantiation is an alternative way where everything needed to install an application on a mobile device is stored onto a non-volatile media such as CD or a floppy disk and physically mailed to the user. The user then uses this media to install the application on the device by means of a desktop machine. For more information about online instantiation using Mobile Client see Oracle Technology Network

After the deployment, both the application and the data schema may change because of enhancements or defect resolution. The Oracle9i Lite Mobile Server takes care of managing application updates and data schema evolution. The only requirement is that the administrator must republish the application and the data. The Mobile Server will automatically update the mobile clients that have the older version of the application or the data.

This concludes the first section of this technical white paper about Oracle9i Lite, a product from the Oracle Wireless & Voice Division.

There is an alternative approach to offline application as mentioned at the beginning of this paper. Oracle Aplication Server 10g Wireless introduces a different model of XHTML/XForm applications that can be executed without a network connection. This approach literally brings offline capability to all XHTML/XForms application without rewriting any code. Please continue for chapter 2 in case you want to learn about this upcoming unique feature of Oracle Application Server 10g Wireless.

Chapter 2

Disconnected J2EE Application

XHTML/XForms Introduction

XForms is an XML application that represents the next generation of Forms for the Web. By splitting traditional XHTML forms into three parts – data model, instance data, and user interface – it separates presentation from content, allows reuse, gives strong typing, reducing the number for round-trips to the server, as well as offering device independence and a reduced need for scripting. XForms is not a freestanding document type, but can be integrated into other markup languages, such as XHTML. XForms is the response to the increasing demand for better web forms and richer Web and electronic commerce application. XForms 1.0 is a W3C standard currently in draft. For more information about XForms see

XHTML/XForms replaces HTML/JavaScript, the most commonly used web-programming language. However HTML has several major shortcomings:

• No client-side validation

• No client-side UI manipulation

• No control over when data is submitted

• No control over post data submitted

• No separation between presentation, purpose, and data

XForms addresses these issues by separating purpose from the presentation, a declarative event handler, multiple-device support, strong typing, and XML submission as the most important features. Constraints can be enforced via declarative methods which. However, there is no concept of offline support in XForms/XHTML. Oracle is committed to bring offline support to XForms/XHTML application by providing a reliable, scalable infrastructure solution with Oracle9iAS Wireless.

XTML/XForms Features

Oracle9iAS Wireless 9.0.4 provides two basic building blocks for XHTML/XForms application:

Virtual Browser (Online)

Offline Support

Virtual Browser

The virtual browser is a highly scalable component, which executes XForms instructions and processes XHTML and CSS tags. There are three main functional areas in the Virtual Browser:

• UI and Network Adaptation Manager

• XHTML & CSS Processor

• XForms Events & Action Processor

The Virtual Browser allows XHTML/XForms application to run on a wide range of wireless devices. High-end devices such as Pocket PC receive an XForms processor to speed up computing and reduce network traffic. Semi-powerful devices with a micro-browser (WAP or VoiceXML) get an event handler, validation, and calculation logic. Thin client (terminal) are managed through a server-side round trip. XForms/XHTML is a common programming model for different kind of wireless devices, which makes it a superior candidate for a true J2EE Web standard. Oracle9iAS Wireless Virtual Browser allows the developer to focus on the business logic implementation and not being distracted by device and network related technical issues.

[pic]

Figure 1 XForms/XHTML Online Architecture

Offline Support

The XClient is Oracle9iAS Wireless client side stack that plugs into the browser, allowing the client browser to process XForms and other application logic locally on the client machine. The XClient contains the following major components:

• Communication Manager

• Persistent Engine

• XForm Engine

• Event Routing

• Renderer

The XClient is designed to support three different modes of operations:

Online mode;

Transient offline mode;

Offline mode.

However, for the XClient, there is really no distinction of the three modes in runtime. It’s up to the user to save or submit the changes to the server at anytime. The same application can run in any of the defined modes.

In the Online mode, all behavior of the XForms applications will be identical to any online web based application. The only difference is that the application may choose to use some of the client side extensions that would not have been possible with normal web based application, for example, client side device control, local data store access, etc.

In the Transient offline mode, if the user tries to submit the document to the server but fails, possibly due to lost of connectivity or server side busy or failure, the user is presented with the option to save the current data and state of the application and can then later retrieve the same application, data and state to update or simply to re-submit to the server when access to the server is possible again (i.e. network is back up again).

In the Offline mode, the user can work on the application when there is no link to the server at all and still be productive. Only when the user decides to, can he submit all the changes to the server side. The server will then send back just the changes (after resolving the conflicts) to the XClient to apply to the local store again.

For an application to be effective in full-offline, some design measures make be made up front. Full-offline application needs to be written so that enough about of logics and application data is included so that the user can performed all the offline tasks required without constantly going back to the server.

[pic]

Figure 2 Offline XForms/XHTML Architecture

Offline Support features are:

• PERSISTENT STORE - TO SUPPORT OFFLINE MODES, THE CLIENT MUST EXTEND THE LIFECYCLE OF THE APPLICATION DATA AND STATES (I.E. THE XFORM DOCUMENTS) AND MOST OF ITS DEPENDENCIES TO BEYOND SYSTEM REBOOTS. THIS IS CRUCIAL BECAUSE USERS OF OFFLINE APPLICATION COULD CLOSE THE APPLICATION (BROWSER IN THIS CASE) OR EVEN REBOOT THE DESKTOP OR LAPTOP MACHINE BEFORE THE NEXT SUBMIT. SO IT IS IMPORTANT THAT THE APPLICATION ALLOWS THE USER TO SAVE HIS WORK BEFORE HE EXISTS FROM THE BROWSER.

• Native Store Access – Wireless devices provide native store (file system) used to store user data such as address book or calendar information. The XClient through an XForms extension provides access to the native store. This means the programmer stays within the XForms programming context and does not have to learn another native store API

• Device Facility Access – Similarly to the native store, this allows the XForms programmer to access device specific facilities such as printer, scanner, or other peripherals. This is paramount on industrial devices, which most often are equipped with sophisticated devices extensions.

• Optimized Data Transfer - The application can be coded to take advantage of an Optimized Transfer mode. In this mode, the submit will automatically post only the changed data in a proprietary format. The application can also decide if it wants to receive just the changes, which tells the server that it wants just the difference between the last data sent from the server to the new data set. This reduces the data transferred dramatically.

• Custom UI Control – XForms User Interface Controls are limited in functionality lacking basic UI functionality known from Windows. This extension allows the developer to add custom UI controls to a data entry field. For example a control could bring up a calendar control next to a DATE entry field

• PocketPC Support – The first supported platform will be PocketPC and Windows 32 (NT/2000/XP)

More information about how to build and deploy XHTML application will be posted in the near future. Please check frequently or Oracle Technology Network/Wireless Tech Center

Conclusion

Oracle9i Lite and Oracle9iAS Wireless offer two different, yet complementary technologies for offline applications.

Oracle9i Lite provides a robust, scalable, database oriented programming model which evolves around the client platform such as Windows 32/CE/PPC, Palm OS, or Symbian. Connectivity to the server is temporarily only for data and application synchronization. The device runs mostly disconnected where the user initiates a network connection using a wireless modem or the cradle connected to the desktop computer to upload data. The offline application maximizes the use of client facilities such as graphical libraries, operating system and network functions for optimal usability. Business application most likely require large amount of data, commonly stored in a SQL database. Oracle9i Lite is a market leader in disconnected database system with over 2000 customers and 400’000 users worldwide. The product evolved over the last seven years from a tiny little database into a complete, integrated Internet framework to develop, provision, deploy, and manage disconnected database application.

Oracle9iAS Wireless 9.0.4 offers an alternative approach using the new W3C standard for web application XHTML/XForms 1.0. This server-side programming (as opposed to the client model in Oracle9i Lite) for online application enables the developer to use Oracle9iAS J2EE infrastructure to write wireless application, which have the unique capability to run with an intermittent network environment. Online is main operating mode (rather offline as with Oracle9i Lite) where the disconnected mode is only temporarily due to network failure or lack of coverage. The server enforces the transactional semantics (opposed to Oracle9i Lite which is also a mobile transaction manager) by means of transactions are executed on the server.

Which one to choose? It really depends on the business and technical requirements. The XHTML/XForms DOM model is distinctively different from the SQL model of Oracle9i Lite. It remains to be seen how fast developers adapt to the new XHTML/XForms standard and when software development vendors are going to provide powerful, yet easy to use visual tools. But the developer does not have to worry about which model to choose because Oracle is committed to integrate and package both products into one by O9iAS 10i time frame. Investments in either technology are protected by the long-term commitment of Oracle9iAS Wireless, the market leader in wireless & voice technology.

-----------------------

Application

Publication

User

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download