⬆️ ⬇️

ExtJS extensions for the Adobe AIR platform

As promised, we continue to acquaint you with the new ExtJS framework . This time , the development team reports that in collaboration with Adobe, they are developing the library in the direction of compatibility with the AIR platform . And this news is the most pleasant, because this environment is best suited for launching serious AJAX applications, while ExtJS allows you to create professional interfaces that are almost indistinguishable from ordinary desktop ones, but using only HTML / CSS / JavaScript tools.



Not so long ago, Adobe released the following significant update for AIR, but for version 1.5, and this topic deserves a separate discussion, and now we will discuss innovations in ExtJS (the original blog post of developers ).



Already from the version, if I am not mistaken, 2.0 in the standard distribution kit, a set of components appeared for accessing and working with AIR platform-specific properties — you can find them in the Ext.air section of the documentation . However, there are only basic functions that are focused on previous versions of the platform.



The first example of enhanced support for the new platform was the MP3 music player ( source code ), which demonstrates the expansion of the Ext.air.Sound component and is designed to play long songs, such as music, podcasts, etc. As I understand it, only one file can be played at the same time, that is, the singleton class will not allow you to simultaneously play sound from different sources. The component allows you to perform all the basic operations - stop, pause, volume control, offering a stylish interface designed in the traditional library style (of course, you can change it).

')

Personally, I was very pleased with the second component - Ext.air.Notify , which implements the notification panel if the application runs minimized to tray. This is really a necessary component, since for many applications this mode is the main one, oddly enough - and previously you had to manually check if the information was updated.







Now the developer can flexibly configure and manage alerts, in particular, message formatting is supported using the template system (typical for ExtJS, if you work with the library, you probably already used it). I really liked this class and in the next project I will actively apply it, and I will definitely tell you about practical experience.



The general settings of the application were previously available only from the configuration file or at the development stage; now we will have the Ext.air.App class, which can be controlled programmatically at any time, in particular, by setting the location of windows, setting the options “on top of all windows” or put the application in full screen mode. Note that the control is available only after starting the application and receiving the object of the active window.



The work with the clipboard is also available - the Ext.air.Clipboard class allows you to use this opportunity to exchange information with other programs or even within applications, because, for example, if you create an admin panel of a content management system, such a function will be in great demand in article editor. In the future, the developers promise to expand the functionality and introduce support for Drag & Drop.



For cases when you need video support in the application, be it just playing videos or working with a video camera, you can use the extension of the standard Panel component - Ext.air.VideoPanel , which can play a video stream from a flash or webcam, up to full-screen high permissions!



The developers have not forgotten about the new features in 1.5, but promise to add their support in the next release of the library, along with the components described above. However, individually, the examples described in the article are available now for experiments and research .



Frankly, I am very pleased that the library is positioning itself as the basis for AIR applications, because, if you think about it, this is the perfect place for it. Browsers badly “digest” the pages where such rather heavy libraries are used, although there is already progress in this. Literally the day before, I tested a pre-release version of our project, based entirely on ExtJS (I can only say that it is a browser-based online game) - and the best results on the interface speed turned out to be in the Firefox 3.1 that was not yet released (with TraceMonkey engine enabled) But in IE of different versions or even in previous releases of Firefox, work is possible, but sometimes slows down. Perhaps this is due to the load on the network (although I reduced the requests, but still we have several timers and every 5 seconds we are polling the server) or with Firebug turned on (although no, it is always on), I don’t know, but the result is real ExtJS shows itself in full force on the most modern platforms specially adapted for the execution of AJAX applications, which can work for hours and days without reloading the page, actively use dynamic loading and execution of JavaScript code and other features. But in AIR 1.5, one of the key features was the update of the Webkit rendering engine and the included JavaScript processing engine, known as Squirrelfish (in the official Adobe blog it was mentioned that application performance could increase by up to 35%, which, however, Need to check).



That's all for now. And, no, one of Ext's competitors, the Dojo Toolkit (as a competitor, in this case I understand Dojo Core + Dijit), also aimed at the AIR platform and announced a separate subproject, Dojo Extensions for Adobe AIR , designed to help developers use the full potential platforms in applications using the Dojo Toolkit. The project is also interesting, next time we will take a closer look at it, and also try to compare AIR support in both libraries. But I dare say, AIR support has long been in ExtJS, now only its extension has been announced, whereas in Dojo, similar components have not been seen before the announcement of this project.



Ps . (dreamy) But if you combine the capabilities of Dojo / Dojox and the ExtJS interface, and run it on the AIR platform, this will be a real deadly weapon ...

Source: https://habr.com/ru/post/45794/



All Articles