Experimenting with the ILog Elixir Components for Flex
I spent some time playing with the ILog Elixir components for Flex. If you haven’t checked them out they are definitely worth looking at. Live samples are available here: http://www.ilog.com/products/elixir/
I experimented with the 3D charts components which definitely provide a good example of the expressiveness of the Flex platform. Looking at the sample code, it looks like you can’t simply enable the 3D mouse interactivity (click and drag to rotate, mouse wheel to zoom in / zoom out) by setting a component property: you actually have to write some code, capture mouse events, etc… In my own experimentation, I isolated that code in a reusable Chart3DControl component that makes it easy to provide this kind of mouse interactivity in any component in your application.
Offline Synchronization using AIR and LiveCycle Data Services

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).
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).
Salesbuilder source code available
As promised, here is the source code for the Salesbuilder Flex / Air sample application:
Disclaimer: This is work in progress and some code still needs to be polished and documented. I’m planning on continuing to develop the application, starting with complete server integration and synchronization. Your feedback and ideas are welcome.
I also took the opportunity to fix a few bugs. You can install the latest version of the app (corresponding to the source code posted above) here:
Christophe
New version of Salesbuilder Flex / AIR application
I spent some time improving the Salesbuilder Flex / AIR demo application I posted a couple of weeks ago. This version is a lot more complete and polished than the initial incarnation of the application.
Salesbuilder is a Sales Force Automation application that demonstrates local persistence using the embedded SQLite database, data synchronization, native drag-and-drop, and other features such as direct chart manipulation.
First, I got help from our Experience Design team (special thanks to Ethan Eismann): this is still work in progress, but the design has already been improved significantly.




I also added a number of new features. For example, you can now create and edit sales opportunities, use the menu bar buttons to access summary screens, etc. One interesting new feature is the direct manipulation options available in the Sales Pipeline bubble chart, and in particular the way data visualization turns into data manipulation/data entry: drag bubbles up, down, left or right to adjust the probability and the expected closing date. The new values are automatically saved to the database.
Click here to install the application.
Follow this guided tour to make sure you don’t miss any new feature.
Credits to Mark Shepherd for the Springgraph component, Doug McCune for the SuperTabNavigator, and Jason Hawryluk for the Flex Rating Component used in this application.
SQLQueue: Chaining Asynchronous SQL statements using the AIR database access API
The AIR database access API is asynchronous. This works well for executing expensive queries without blocking the user interface. However, sometimes you may need to run a series of short and interdependent statements, and in that case, executing each statement asynchronously and independently can make your code difficult to manage.
Consider an example where you have an array of contact objects that you need to persist to your local database (this might be part of a data synchronization process). Your Flex code might look like this:
AIR-to-Desktop Drag-and-Drop: Two Simple Utility Classes
One of the exciting features of AIR is that it enables drag-and-drop between your Flex applications and the desktop: For example, you could drag a chart from your Flex application and drop it on your desktop as a JPG, or directly inside a Word document. Similarly, you could grab some rows from a Datagrid and drop them on your desktop as an XLS file, or directly inside an Excel spreadsheet.
I spend a lot of time talking with Financial Services organizations, and this is a feature that they are really interested in.
This is “native” drag-and-drop handled by the operating system. The way it works is that, on “drag start” in your application, you are responsible for packaging the relevant data in one or different formats (text, bitmap, file). When the user mouses over another desktop application, that application will look at the formats available, and decide if it wants to accept a drop. If it does, it will adjust the drag icon accordingly and consume the data as appropriate if the user releases the mouse button.