Thursday, December 20th, 2007

Ajaxian Featured Tutorial: Build your first Adobe AIR app

Category: Adobe

<p>With all of the press surrounding Adobe AIR, I’m sure many of you have been chomping at the bit to give it a go. Jonathan Snook shows you how in his tutorial, Christmas Is In The AIR. AIR is Adobe’s answer to leveraging existing web technologies for building desktop applications and it’s a cool bit of technology. Jonathan walks you through all of the basic steps of setting up your development environment for the AIR SDK, explaining the file dependencies and discussing AIR’s Sandbox Security model. One of the coolest parts of the tutorial, though, is when he shows how to store data via the AIR API:

You’ve essentially got 4 different ways that you can store data:

  • Using the local database. AIR comes with SQLLite built in. That means you can create tables and insert, update and select data from that database just like on a web server.
  • Using the file system. You can also create files on the local machine. You have access to a few folders on the local system such as the documents folder and the desktop.
  • Using EcryptedLocalStore. I like using the EcryptedLocalStore because it allows you to easily save key/value pairs and have that information encrypted. All this within just a couple lines of code.
  • Sending the data to a remote API. Our to-do list could sync up with Remember the Milk, for example.

To demonstrate some persistence, we’ll use the file system to store our files. In addition, we’ll let the user specify where the file should be saved. This way, we can create multiple to-do lists, keeping them separate and organized.

The application is now broken down into 4 basic tasks:

  1. Load data from the file system.
  2. Perform any interface bindings.
  3. Manage creating and deleting items from the list.
  4. Save any changes to the list back to the file system.

This tutorial is really a good read and would highly recommend it to anyone who wants to get a headstart with Adobe AIR.

Related Content:

Posted by Rey Bango at 6:30 am
1 Comment

+++--
3.7 rating from 23 votes

1 Comment »

Comments feed TrackBack URI

If they could just get eval() going, I’d be on AIR like a fly on stink.

Comment by igaenssley — December 20, 2007

Leave a comment

You must be logged in to post a comment.