What's new awaits us in AIR 2.0

    imageAdobe MAX 2009 is the largest conference where Adobe presented many interesting projects and announced the release of its CS 5 product line next year (and there are a lot of interesting things right now, for example, Flash CS 5 promise affordable beta by the end of the year ). But for web developers, the most anticipated is a fairly small project (compared to others) - Adobe AIR 2.0. The current version 1.5.x has strong support from the industry and developers, including because it uses the usual technologies for development - JavaScript / HTML and Flash. Many companies are releasing applications for AIR, including industry giants like eBay, NASDAQ, FedEx, the media giant Fox and others. Adobe itself has created several multimedia projects to distribute its platform.

    But there is already news on the horizon about the next generation of AIR, which should not only further strengthen its position in the field of web application platforms, but even, without exaggeration, simply remove all other competing platforms. What new awaits us in AIR 2.0?

    I have repeatedly stated that AIR is by far the best platform for RAI applications, without any deviation from the word “applications”. Many companies release projects for AIR, including industry giants like eBay, NASDAQ, FedEx, the media giant Fox and others, Adobe itself has created several multimedia projects to distribute its platform.

    In this review I described several competing platform products for the RIA, but even the most powerful Appcelerator Titaniumall the same, it cannot boast of all the AIR 2 features, although, without a doubt, the first and real candidate for rivalry, especially in version 0.7, where PHP support has already appeared as a scripting language.

    And now about the main thing ...


    • The ability to run external applications - yes, now it will be possible to initiate the opening of applications from AIR, for example, if you work with Word or Excel documents, you can provide the user with the opportunity to open the file directly from the application in his native program, previously it was available only for PDF- files (as I understand it, only because Flash learned to render PDF).
      • In more detail, new classes are responsible for this functionality: flash.desktop.NativeProcess, which allows working with the command interface, intercepting and processing standard input / output streams and errors, flash.desktop.NativeProcessStartupInfo to get information about processes, flash.events.NativeProcessExitEvent - processing the event of completion of the stream. Important note - this functionality is available only for applications in the form of native installers; for air packages that can be installed from a web page, they are not available (apparently for security reasons).
      • The openWithDefaultApplication method, through which you can open a file in an associated application, or run it if it is an application (executable file), is responsible for the ability to open files in native applications.

    • Native installation packages for the application. If earlier your program was packaged in a platform-independent * .air format (very similar to jar), now you can create native applications for each platform (the question remains open - will it be possible to create an independent distribution kit when the AIR environment itself is included in the package) . Of course, the option with the air package will also remain. In this regard, Adobe is in the role of a catch-up, because the same Titanium initially had these capabilities (the entire runtime environment immediately comes with the program and is individual for each application, unlike the one shared in AIR).
    • Advanced file management capabilities and desktop integration - FilePromise, URLFilePromise, which will allow you to work with files and transfer them between the application and the OS (in fact, the ability to specify a URL or file as trusted and process it in the application, then transfer the OS).
    • Extended work with sockets. This is perhaps the most important and expected innovation - the creation of server sockets, which Flash did not know how to do before, but AIR can (in Titanium, for a long time, this is, and in my opinion, often the most significant plus of this platform). The flash.net.ServerSocket class is for this purpose intended.
    • IPv6 support. While not very relevant, however, if your application should work inside its own network or intranet, then it may come in handy.
    • Support for the UDP protocol - now there is support, in addition to TCP, for the UDP protocol, which will allow you to work as quickly as possible with services for which the minimum delay is important, the rest can be neglected, but it is not yet known whether UDP will be supported in server sockets. For UDP sockets, the class flash.net.DatagramSocket is responsible.
    • Network Information. An application using the flash.net.NetworkInfo class will be able to get much more information about the network environment. For now, the information is limited to the list of available network interfaces and IP address data.
    • Work with DNS records and servers. Allows an application to get all the information about an arbitrary domain and communicate directly with a DNS server. Apparently, we should expect special applications for SEO, as well as platforms for cyberswaters.
    • Applications will now be provided with support for special screens and / or programs for people with disabilities ( Screen Reader ). So far, this functionality is available only on Windows and includes work with dialog boxes, as well as special classes for Flex components.
    • Direct access to microphone and audio stream. This opportunity was expected by so many! Now you can record sound from a microphone without the obligatory participation of a remote server, gaining access to raw stream data in the form of PCM ByteArray. Data can be saved to a wav file and played from the application. In principle, direct encoding to another format is also possible.
    • Built-in DBMS gets enhanced support for transactions and savepoints. To do this, new functions savepoints (), setSavepoint (), releaseSavepoint () and rollbackToSavepoint () are introduced.
    • Advanced features for working with printing systems. Now you can individually specify the print mode for each element (or page), in particular, set the output mode (vector or raster), if supported by the OS and the driver. Learn more about the printing subsystem in ActionScript 3 here .
    • Idle timeout support - as I understand it, you can detect the user’s operating mode and determine whether he is currently working with the application or not, for example, to switch to the background.
    • The maximum size of the application window is now expanded to 4095x4095 pixels, which allows you to run AIR applications on large screens and use the entire available area. Also added support for touch screens and multi-touch.
    • Working with storage systems - the application through the new classes flash.filesystem.StorageVolume and flash.filesystem.StorageVolumeInfo can receive complete information about all storage systems, disks, logical partitions, determine the ability to write to partitions, and detect removable drives and flash drives.
    • New features for global error trapping, essentially a try / catch block for the entire application together.
    • Profiling and debugging for JavaScript code.
    • Profiles for the application - you can selectively create profiles for various use cases of the application, including or disabling certain features. The following profiles are now available: desktop for regular applications, NativeDesktop for applications with a native installer, mobile and extenden mobile for mobile applications.
    • Mobile app support. Yes Yes Yes! You can create mobile applications, including for the iPhone - and these will be native applications for the platform from Apple (as long as there are difficulties with Flash on the iPhone, Adobe simply generates native code for the iPhone).
    • The updated Webkit rendering engine (the same as in Safari 4 beta) now allows:
      • use the fastest JavaScript engine - SquirrelFish Extreme (with many optimizations, including polymorphic caching and a lightweight JIT compiler)
      • CSS Transformations
      • CSS Transitions
      • CSS Animations
      • gradients (CSS Gradients)
      • Quick Selector API for accessing DOM nodes (Webkit CSS selectors)

    • In the Flash / Flex parts of the application, you can now freely create and render HTML, JS, and even PDF documents through the built-in Webkit, working with the document structure in the same way as with AS objects.

    That’s probably all. In my opinion, the changes are excellent and will significantly expand the scope of application of AIR and the range of applications. From what is relevant for me, of course, is working with a network (server sockets, UDP protocol), the ability to create native applications with an installer, improvements in the Webkit engine, and especially in the JavaScript engine. It remains only to wish something serious about working with 3D graphics, for example, WebGL and better support for acceleration. Also, I am still not sure about the possibilities for working with SSL and cryptography in general. I would also like more built-in libraries that would be available not only in Flash, but also in the JavaScript API. And so - just fine! We wait!

    PS Link to a recording of a speech dedicated to AIR 2.0 .

    Also popular now: