Offline Synchronization using AIR and LiveCycle Data Services

contacts3.gif

As part of my MAX talks in Chicago and Barcelona, I used a simple Contact Manager application to demonstrate offline synchonization using AIR and LiveCycle Data Services (LCDS). Many people have asked me to share the code, so here it is… This is actually an update of an application I posted a few months ago (but that didn’t include the offline synchronization part at the time).

Read more

New AIR SQLite Administration App (with Source Code)

UPDATE: This version is now obsolete. A new version is available here.

Here is an updated/rewritten version of my AIR SQLite Admin application. You can use this application to examine the structure of a database, create a new database or open an existing one, execute any type of SQL statement, etc.

An interesting aspect of this new version is that the application itself uses a database (sqladmincache.db) to keep track of the databases you opened and the statements you executed. This is useful if you want to quickly re-open a recently accessed database, or re-execute a recently executed statement.

This new version uses synchronous database operations (AIR beta 1 only supported asynchronous database access), and uses the schema API (also new in beta 2) to show you the list of tables and columns available in your database.

The UI is still simple, but uses some new AIR and Flex 3 features such as the AdvancedDataGrid and Native Windows.

Click here to install the application.

Click here to download the source code.

Speaking at the QCon Conference in San Francisco (Nov 7-9)

I will be presenting a session called “Rich Internet Applications for the Browser and the Desktop with Flex and AIR” at the QCon Conference on November 7th. I delivered a similar session at QCon in London earlier this year: QCon is definitely a high quality conference with deep technical content around Java, .NET, Ruby, SOA, Emerging Client Technologies, etc. The conference will be held in San Francisco from November 7th to 9th, with two days of tutorials on November 5th and 6th. Hope to see some of you there!

Salesbuilder for Flex 3 / AIR Beta 2 (AIR file + source code)

I migrated the Salesbuilder application for Flex 3 / AIR beta 2.

Click here to install the application.

Click here to download the source code.

Follow this script for a guide tour of the application.

Annotating ActionScript Classes with Custom Metadata + Simple ORM Framework for AIR

A little known feature of Flex 3 is that you can annotate ActionScript classes with your own metadata. For example you could annotate a class as follows:

package
{
	[Bindable]
	[Table(name="contact")]
	public class Contact
	{
		[Id]
		[Column(name="contact_id")]
		public var contactId:int;

		[Column(name="first_name")]
		public var firstName:String;

		[Column(name="last_name")]
		public var lastName:String;
		public var address:String;
		public var city:String;
		public var state:String;
		public var zip:String;
		public var phone:String;
		public var email:String;
	}
}

In this example, [Bindable] is a standard Flex metadata annotation while Table, Id and Column are custom. The -keep-as3-metadata compiler flag allows you to instruct the compiler to keep your metadata in the generated SWF so that you can get to this information at runtime using the reflection API (describeType).

Read more