« on AIR Bus Tour | Main | AIR Embedded Database Code Exerpts 1 »
AIR Embedded Database Sample Application
| By Rich Tretola | June 11, 2007 | Print This Post
|
| 39 views |
EmployeeDirectory (Download the AIR Installer)
This application utilized the SQLite embedded database and the network connection event listeners which are part of Apollo.
It also uses Cairngorm for interacting with the remote ColdFusion server for backup and restore functionality.
Upon first run, the local SQLIte database and tables are created.

Attempting to add a new Employee record validates the form

The Employee record passes validation and is saved locally.

Selecting the record from the grid will put form in edit mode.

If the application detects a network connection, the server interaction buttons are available. Clicking Back Up sends the data to a remote ColdFusion server.

While the record is highlighted in the grid, hit the delete button which removes the local record from the SQLite database.

Clicking Restore will prompt the user to overwrite any local data.

The record is retrieved from the remote ColdFusion server and saved back into the local SQLite database.

I spent the past few hours patching errors that occurred when the public beta was launched so the source code is kind of ugly. I will post it as soon as I feel that it is in a clean state.
Topics: Adobe AIR (Apollo) |







June 12th, 2007 at 11:49 am
[...] are some excerpts for the AIR Embedded Database [...]
June 15th, 2007 at 4:13 am
[...] but this code can probably be reused by anyone wanting to get started with AIR+SQLite. There are a couple of other AIR+SQLite examples out there to check out and don’t forget the documentation on the [...]
October 16th, 2007 at 6:41 am
Hi Rich, how are you synchronizing the data between the local and the remote DB?
Do you have any down loadable example?
Thanks, Tiago
October 16th, 2007 at 7:07 am
In this case I am simply passing the Objects to a remote ColdFusion server over AMF. I point my local AS3 object to my remote CFC:
Here is the sample connection:
Employee ActionScript Object
Employee ColdFusion CFC
I do also have a central delegate but it simply calls this DAO to manage the remote data:
Comments
Entries (RSS) and Comments (RSS)