Watch videos with subtitles in your language, upload your videos, create your own subtitles! Click here to learn more on "how to Dotsub"

Adobe AIR 2 New Features for Enterprise Developers

0 (0 Likes / 0 Dislikes)
[Adobe Developer Connection] [Greg Wilson - Sr. Enterprise Technical Evangelist] Hello. This is Greg Wilson, a technical evangelist with Adobe. Today I want to walk you through some of the new features in AIR 2 that are relevant for Enterprise developers. Among all of the new features of AIR 2, there are a handful that really stand out that I think Enterprise developers have been looking for, for quite awhile. So to demonstrate this, I'm going to go into Tour De Flex. Many of you know Tour De Flex is an application that we put out a couple of years ago that contains nearly 500 samples of Flex code that demonstrate both Flex and AIR. Recently, we updated it to have quite a few AIR 2 samples. So I'm going to open up the application and open up the folder for AIR 2 samples. And now on the left side, you'll see quite a few APIs that we demonstrate, but today I want to focus on the ones that are new with AIR 2 for us Enterprise developers. So first of all, let's start with some of the simple ones and I'll end with the fun one. So download security dialogue--this is a new feature that was added that can detect if a file was downloaded from the Internet or not, or whether it was installed through a native application. So I'm just going to go in and click on a file. and Check if downloaded. You'll notice we get a caution message saying this file was downloaded from the Internet. So this way you can build your applications to detect whether a file that is being opened by the user, was downloaded from the Internet and then make certain decisions in your code based on that. Now, like every sample in Tour De Flex, we have a running sample on top, and down below, we have the source code. For the sake of time, I'm not going to walk through the source code of all of these, but I do want to point out that every one of them is very simple, and a lot of times it comes down to just one or two lines of code that really highlight the new API So the next feature I want to talk about is mass storage detection. A lot of times in applications, you may want to plug in a camera or some sort of external device in a USB port. and be able to detect that that has happened and navigate to the files on it. So to quickly demonstrate this, I will go into the sample in Tour De Flex, and I've got a USB drive with a few image files on it. I'm going to plug that in my USB drive, and without touching the keyboard, you'll see it immediately detected that the drive was inserted and is showing me all of the files on that drive. I can scroll through the list. The next one I want to show you is Open with Default Application. Now, what this does, it will open any application with whatever is the default app on your operating system. So, for example, Microsoft Word document--it will open in Microsoft Word. If you have an image, it will open whatever your image editor is. So I'm going to go and open up a quick file, and actually, we'll just go to an image. This is a very simple file navigator, and when I open the image, you'll notice it opens up in my native file viewer. I have one called Z for viewing images. And it immediately opened in that application. Again, if you look at the code, this really comes down to just one line of code when you get past all of the UI, and that's opened with Default application. The next one is a very simple one. It's a shutdown event. Imagine if you have an application, and the user is involved in collecting data or whatever, and for whatever reason, they shut down their machine and they forgot to close the app. You can detect when the application itself gets shut down, if the user hasn't saved their work. whether it is shut down by the OS or by the user. You can actually detect that and in the code, capture that and save the work. Again, if you look at the code, it really just comes down to one new event listener, and it's the Event.EXITING event. The next one is the server socket API. A lot of Enterprise applications, you may build in AIR need to talk to back-in applications through various means, and, starting with AIR 2, we allow you to listen on a socket and also write on a socket. Now, for this particular sample in Tour De Flex, there are actually two tabs. We have one that takes the role of the server and one that takes the role of the client. So what I'm going to do is start out by starting the server. And it is listening on that port for our client. So now, we're going to go over to the client, and we're going to connect on that same port. Now, on both of these, I've connected to local host. Now, I'm just going to enter some text data, and click Send. And if we go back over to the server side, you'll see that it sent that data through. Now that's two independent applications running, one acting as a server and one acting like a client. Once again, the code is below--very simple. For the next one, I want to change over to Flash Builder. And this is the most exciting one that a lot of us Enterprise developers have been waiting on since AIR 1.0. This is the ability to interact with native applications, so it's the new process API. And for the demo in Tour De Flex, I want to walk you through a little bit of the code. We tried to figure out what would be a great demo to show that would work both on Windows, MacOS, and Linux. And the one thing that we came up with in common across all of these was the ping command. You use ping typically to determine whether you have network connectivity to a particular destination. So we have some code that, depending on whether it's Windows, Mac, or Linux, it goes and looks for the file, the executable file called ping. And then after that, it runs the code and will display the results in an output window. So why don't we run this code and just take a look at what happens. So here is the AIR application, and you see we have a Trace. When I click Run, it is going to call the ping command, capture the standard output of it, and then display it to this text box within our application. So now you see it pinging and coming back to us with the resulting messages. So that is some of the cool features in AIR 2.0. I think that's the ones that are most relevant for Enterprise developers. There are a lot of other cool features in AIR. A couple of other features I wanted to point out that are actually part of an earlier release of AIR in the 1.5 series--was database encryption. A lot of Enterprise developers want to be able to encrypt their data when they are doing off-line storage with Adobe AIR applications, and you can do that with AIR as well, but with that feature combined with everything we've added in 2.0, I think the AIR 2.0 is definitely ready for some very cool Enterprise applications. For more information, you can go to the Adobe AIR homepage and that's all. Thank you. [Adobe Developer Connection]

Video Details

Duration: 6 minutes and 47 seconds
Language: English
License: All rights reserved
Genre: None
Views: 92
Posted by: adobetv on Oct 21, 2010

Greg Wilson shares his excitement about new features in Adobe AIR 2: download security dialog support, mass storage device detection, open-with-default application, exit event, server socket, and new process for native applications.

Caption and Translate

    Sign In/Register for Dotsub to translate this video.