by Michael Koch
Surely you've heard about Adobe AIR. Perhaps you've already played with this new runtime and discovered the cool things it enables you to do. If not, let me point you to some resources that will pique your curiosity and help you get started building and distributing AIR applications in no time. Even if you've already played with it, you may find the following resources helpful.
Simply put, Adobe AIR lowers the bar for desktop application development by enabling you to take your rich Internet applications (RIAs) to the desktop using your existing web development skills, tools, and code. That's pretty cool. Think about it: Without having to learn new technologies, you can build and deploy highly engaging applications that run on Windows and Mac OS X (and the alpha version of Adobe AIR for Linux is now available on Adobe Labs). It's also powerful because you can add desktop integration, local system and network access, and enhanced branding opportunities to your RIAs.
Of course, with great power comes great responsibility. Because certain coding practices and patterns that may be common in web applications can wreak havoc on a user's desktop, the Adobe AIR team came up with a primary security model for AIR applications. To learn more about this security model, be sure to give Lucas Adamski's Introducing the Adobe AIR security model a careful read. This article explains the rationale behind the AIR security model and includes links to additional resources that provide guidance and information on best practices when building AIR applications.
Note: You don't need to know all the details of the AIR security model before you start building AIR applications, but some familiarity can help avoid confusion because some characteristics of the security model can be surprising — especially for HTML developers.
Your key resource for AIR development is the Adobe AIR Developer Center. Here you'll find how-to articles, tutorials, documentation, sample applications, software downloads, and community resources that help you get started quickly and hone your AIR application development skills.
To accommodate the diverse needs of Ajax, Flash, and Flex developers, the Adobe AIR Developer Center is divided into three subcenters. Each subcenter provides technology-specific information as well as sample applications designed to inspire and demonstrate what you can do with the AIR APIs. However, don't just stay in your corner of the technology sandbox; keep an eye on what other developers are building on AIR in their respective corners. As an Ajax developer, you may be inspired by an AIR application built on Flex, and vice versa. That's what happened to Adobe's platform evangelist Kevin Hoyt, who re-created a Flex sample application built on AIR using his HTML skills to bring Yahoo! Maps to the desktop (see Figure 1).
Note: For truly inspiring examples of what you can do with AIR, check out the Adobe AIR showcase applications. You may be surprised to learn how established businesses are using AIR.
Figure 1. MapCache on AIR
The Getting Started pages for Ajax, Flex, and Flash developers contain all the information you need to start building AIR applications, including software and extensions for your preferred development environment as well as tutorials and reference information.
Once you have the basics under your belt, you may want to check out the AIR Quick Starts for Ajax, Flex, and Flash developers. Quick Starts introduce you to important AIR features (such as custom chrome, menus, database access, and more) by way of simple sample applications.
After you've gained some familiarity with AIR, you may find it instructional to download the AIR sample applications for Ajax, Flex, and Flash developers and explore the source code to see how Adobe engineers and the developer community are using AIR APIs in conjunction with other technologies to accomplish certain tasks.
Finally, when you've finished your first AIR application, and you think it's just too good to keep for yourself, you can leverage the Adobe AIR Marketplace to get your application into the hands of users. Be sure to read the FAQ to learn about the necessary steps you have to take.
At the core of every AIR application file is an HTML or SWF file that contains the functionality and user interface of your application, and an XML file that describes your application to the AIR runtime. This descriptor file contains metadata and global information about your application, including how it's packaged, the digital certificate used to sign it, and any assets that contribute to your application's look, feel, and behavior on a user's system.
These two files — together with any other assets or files required for your application to work — are packaged in an AIR installer file, which is in essence nothing more than a ZIP file. Double-click an AIR file and the AIR application is installed on your system; change the .air extension to .zip, and you can see what's in the package.
Looking for a development environment that meets your coding needs? Let Kevin Sawicki show you how the free, open source Aptana Studio IDE makes it easy to develop on AIR — from setting up your project to debugging and exporting your AIR application.
Dreamweaver users also benefit from development ease with the free Adobe AIR extension for Dreamweaver CS3. Just watch Scott Fegette's demo of Using the Adobe AIR Extension for Dreamweaver CS3 to learn how to configure Dreamweaver CS3 to work with AIR so you can build, preview, and package AIR applications.
Building on AIR in Flex or Flash CS3 is as easy as building a regular Flex or Flash application and then packaging it as an AIR file. If you're a Flex user, check out Tom Lane's demo to get the skinny on how to get started building an AIR application in Flex Builder 3. Then give Todd Prekaski's Building Flex and AIR apps from the same code base a glance. Todd demonstrates how you can output web and AIR applications from your Flex Builder workspace by creating a single maintainable code base.
To learn how to build your first AIR application in Flash, check out Creating your first AIR application using Flash CS3 on Adobe LiveDocs. You'll be surprised by how easy it is. In fact, if you've followed best practices when building your Flash application, taking it to the desktop and adding AIR functionality is simple, as Giorgio Natili demonstrates in Sudoku on Adobe AIR: Migrating a Flash application to the desktop.
Figure 2. Play Sudoku on AIR
Going it alone may not always get you to your final goal. After all, there's only so much the Adobe AIR Developer Center can provide, which is why I encourage you to also seek out support from the community through the Adobe discussion forums where you can engage with peers on AIR related topics.
We're also working on an AIR cookbook, modeled on the Flex cookbook and currently in beta, where you'll find experienced AIR developers posting solutions to common problems. For more inspiration as well as tips and tricks, you may also want to keep an eye on active AIR bloggers such as Kevin Hoyt, David Tucker, Christian Cantrell, and Lee Brimelow.
Finally, please let us know what you would like to see in the Adobe AIR Developer Center. For feature requests and bug reports, go to the AIR support page. For content ideas (including articles, tutorials, or sample applications) drop us a note. And if you've built something cool that you'd like to share with the community in form of a sample application or article, let us know as well.
Michael Koch manages the Adobe AIR and Dreamweaver Developer Centers.