Original URL: http://www.theregister.co.uk/2010/06/24/adobe_air_2_0_review/

Adobe's second AIR defies Jobs' Flash iPhobia

Evolutionary RIA step for PC, Linux - and Mac

By Tim Anderson

Posted in Developer, 24th June 2010 11:02 GMT

Review Thanks to Steve Jobs, attention on Adobe Systems' Flash this year has mostly been on mobile a fact Adobe helped compound by recently releasing its AIR runtime - based on Flash - for Android partners.

Adobe's progress with AIR for mobile has been slow, while Apple's iPhone and iPad Flash ban has damaged Adobe's cross-platform strategy as Apple's App Store dominates mobile development.

But how about AIR on the desktop - remember that? Adobe has now released AIR 2.0 with new features including limited native code interop.

Just to remind you, AIR is essentially the Flash player combined with WebKit for HTML applications, SQLite for local database support, and extensions to the ActionScript 3.0 library that give some access to the local system. It runs on Windows, Linux and - oh, yeah - Mac.

AIR 2.0 is based on Flash Player 10.1, with new features including global error handling and performance optimizations. In addition, there's multi-touch and gesture support, the ability to open documents with the default application and to detect removable storage media, access to microphone data with local audio encoding, nested transactions in SQLite, the ability to launch and communicate with local executables, and the ability to drag files from a remote server to the desktop and have them downloaded in the background.

Opening Excel in AIR 2.0

One line of code opens a document in the default application

The new file.openWithDefaultApplication() method is a small feature with big benefits. AIR is sometimes used for financial applications, for example, and the ability to open a set of figures in Excel will be welcome.

Native code interop is valuable but has annoyances. Clearly it is better avoided, but there are times when a dash of native code is what it takes to make an app viable or implement a much-requested feature. You can now do this, but communication is restricted to standard input/output, which will normally mean compiling an intermediate executable.

Further, if your app uses this feature it cannot be deployed and updated in the normal AIR fashion, but needs a native installer. Silverlight's COM interop is easier to use, though not fully comparable since it is Windows-only.

Networking is better in AIR 2.0. A new ServerSocket class lets you build a TCP server in AIR. There's also support for secure sockets, IPv6, DNS resolution, and the ability to search for network interfaces and bind to one that you select.

Finally, AIR 2.0 includes a new version of WebKit, with JavaScript performance improved thanks to the SquirrelFish Extreme engine, and greatly improved CSS support. Note that AIR for mobile does not support HTML Applications or, as far as we can tell, native interop.

There are several approaches to building AIR applications. The most developer-centric is the Eclipse-based Flash Builder, formerly called Flex Builder, which has a visual form designer, ActionScript code editor, integrated debugger, and in the Premium version Flex unit tests and a network monitor for examining network traffic.

Designers on the other hand can create AIR applications directly from the Flash IDE. There is also Flash Catalyst, introduced in Creative Suite 5 and described as an Interaction Designer, which lets you convert artwork to programmable components, and create simple applications without code. Catalyst projects can be exported to Flash Builder, but once edited there you cannot go back.

Flash Builder AIR 2.0

Flash Builder supports a variety of data source types

The third option - and only one for Linux developers - is to use the free AIR SDK with command-line tools.

While choice is good, the tooling for AIR feels messy. Individually, Flash Professional, Flash Catalyst and Flash Builder all have strong points; but three IDEs is at least one too many. It would be good to see the visual tools in Catalyst become part of Flash Builder, though Adobe may resist this on the grounds that Catalyst is aimed at non-coders.

Even so, Flash Builder in particular is a strong IDE, and well suited to Java developers who will likely already know Eclipse. The form designer is simple but effective, visual states work well, and data connectivity is another strong point, with code generators for a variety of server-side technologies from SOAP to JSON to Adobe's own LiveCycle Data Services or its free version, BlazeDS.

AIR 2.0 is no revolution, but does lift a few limitations and extend the range of applications for which it is a viable runtime. In the end it is Flash, which is why AIR is popular for multimedia apps like BBC iPlayer, or apps that include data visualisation. The ActionScript language looks dated now, but does the job.

AIR 2.0 is worth considering for cross-platform applications. ®