Building Adobe AIR Applications with HTML and Ajax

So I have begun working with Adobe AIR at work because it fits the needs of a specific project we are working on. Specifically, it can store data on the local machine to later be synced with a remote server.

I am not sure that the way I am developing this application is the "right way", if any such thing exists, so I figured I would blog about it and get some feed back from the community. Perhaps there are things I could be doing differently, or more efficiently, or simple in ways that make more sense. I would love to hear about it if you see something.

The Basics

I wasn't going to do a post on the basics of AIR, but I changed my mind. It's good for me to write about things that are mundane. Keeps it fresh in my head and helps me learn to articulate my thoughts.

I am not going to describe what AIR is in any detail. I draw the line there. If you have never even heard of Adobe AIR, check out these resources.

Some of the stuff in those articles is what I will be discussing.

What is Adobe Air?

So this will be the extent of my section on describing what AIR is.

First the Adobe "Marketing Speak" version:

The Adobe® AIR™ runtime lets developers use proven web technologies to build rich Internet applications that run outside the browser on multiple operating systems.

Wow. I'm sold.

Now for my version:

Adobe AIR let's you use HTML and Ajax (and Flash or Flex) to create desktop application. They work, very similarly to who you would expect them to work when being viewed from within the browse, but they are not in the browser, they are running as their own little desktop application. There are a few differences, some of which we may discuss.

Overall, It's pretty cool. And it is a lot of fun to work with.

The Adobe AIR Runtime Engine

Not to be redundant, or repeat myself, but the title of this section is "The Adobe Adobe Integrated Runtime Runtime Engine". Since AIR is the Adobe Integrated Runtime (AIR).

AIR applications require the use of the Adobe Integrated Runtime Engine on the machine on which the application will be run. Just as a Flash or Flex application requires the Flash player, an AIR application requires the runtime be installed.

You can install Adobe AIR here. Or, if like me, you installed Aptana Studio to do your AIR development, you can install AIR from within Aptana Studio by going to the HELP menu and clicking on Adobe Air >> Install Adobe AIR Runtime (ahhhh redundancy).

Now you should have Adobe AIR installed. Next you need the SDK.

The Adobe AIR SDK

SDK stands for Software Development Kit. Which is just what we need, because that is what we are planning to do. The SDK has things that you need to develop AIR applications. Things like ActionScript and JavaScript libraries specific to creating AIR Applications. The SDK also has the compiler and debugging compiler. Plus other stuff. To read more about the SDK, you can look here.

Again, if you installed Aptana Studio, then it will have installed the SDK for you. But you are free to install it on your own, perhaps you are a glutton for pain and would rather do all your debugging and compiling from the command line :)

Aptana Studio

All of the examples I show in my AIR posts will be done from Aptana Studio. Aptana has made AIR development SO MUCH easier. I highly recommend it. I am using the free version as a plugin to Eclipse. You can also get Apatna Studio as a Standalone version (which is still Eclipse). Either version can be upgraded to the Professional version for a nominal fee. I have yet to need the Professional version, though I suspect that will change in the future.

You can download Aptana Studio, or the plugin is available from the update sites: http://update.aptana.com/update/studio/3.4

NOTE to Ganymede Users: Specific instructions

Once you have Aptana installed, you MUST go install the Adobe AIR plugin for it. When you launch Exclipse/Aptana after restart, Aptana will display a "My Aptana" screen. Where you can click on the Plugin image. This will take you to the plugin screen.



There, under the Platform Tab, you will see a "Get It" link for Aptana Adobe AIR 1.5 Development. Click that link and it will walk you through getting the AIR tools for Aptana.


Now you should be able to create and run AIR applications from within Aptana. For more information on creating and running AIR applications in Aptana, check out these tutorials from Aptana.

Aptana Getting Started with AIR Development

Conclusion

This is all I am going to cover today. I'm not yet sure what I will discuss next time. But I promise, it will be more interesting than this post was ;). If anyone has questions or comments, please feel free to leave them. I will do my best to answer them.

Comments
Steve 'Cutter' Blades's Gravatar Maybe an ExtJS + AIR sample? ;)
# Posted By Steve 'Cutter' Blades | 3/26/09 10:41 AM
Jason Dean's Gravatar @Cutter, I don't know enough about ExtJS to do that. I have dabbled, but mostly through the ColdFusion Ajax stuff. My demos will be jQuery with AIR. But please, feel free to take any of my samples and convert them to ExtJS samples over on Cutter's Crossing.
# Posted By Jason Dean | 3/26/09 10:49 AM
andy matthews's Gravatar I'm working through AIR, jQuery, and SQLite stuff last night and today. I'd love to see a post about it on your blog. Might help cement what I'm finding in various locations.
# Posted By andy matthews | 3/26/09 11:38 AM
BlogCFC was created by Raymond Camden. This blog is running version 5.9.1. Contact Blog Owner