AIR 1.0 and YUI

By YUI TeamFebruary 25, 2008

Adobe released AIR 1.0 today — great news for web application authors everywhere who now have one more compelling platform on which to deliver their products, and a platform that extends their reach into desktop space.

As you'd expect from AIR, which embeds an A-Grade version of the Webkit foundation that underpins Apple's Safari browser, most JavaScript libraries work well and do just what you'd expect in AIR. YUI is no exception. We've been tracking AIR's progress over the past several months, and we're happy to share with you a showcase YUI app written in AIR 1.0 by YUI engineer Dav Glass. This application is based on Dav's "Complex Example" for YUI, which brings together a broad cross-section of YUI components, and it's a nice proof of concept for what YUI can do in the context of your AIR applications.

The YUI Complex Example running as an AIR application.

The following YUI components are employed in Dav's application:

YUI Core:

YUI Utilities:

  • Animation Utility
  • Selector Utility
  • Get Utility (note: the AIR sandbox prevents you from loading external script files, but Get otherwise works as expected)
  • YUI Loader (note: due to limitations in the AIR sandbox, YUI Loader should be used to load YUI files that are packaged in your AIR application)

YUI Controls:

We're continuing to work on some aspects of YUI that are not compatible with AIR. The most significant issues we're working to address are these:

  • JSON support in DataTable: Currently, DataTable's JSON parsing routines are not compatible with AIR 1.0. We expect to address this in YUI 2.5.1 next month.
  • Rich Text Editor: Dav patched Rich Text Editor for his demo AIR application above, making some adjustments with respect to how AIR handles the loading of content in frames. In YUI 2.5.1, we'll add unified support in RTE for AIR addressing this and several other issues.
  • AutoComplete: The AutoComplete Control today is not compatible with AIR when using JSON datasources. We will address this issue in a future release.

AIR is a unique environment that has its own set of nuances and quirks, some of which will doubtless affect your applications as you migrate them from pure browser-based deployments into the AIR context. The issues above are the ones we know of today that are YUI-specific. Based on Dav's experience converting the Complex Example to Air, we're excited about the role YUI can play in AIR apps and looking forward to addressing those few core issues that remain.