Kay lives here

working with the web

iStock_000014841479Small

Kai Koenig on AIR at the Edge of the Web

image.png

Ger­man ex-pat and cur­rent New Zealan­der Kai Koenig is best known for being a blog­ger, Cold­Fu­sion dude and Flex guru, but in fact, he also has another area of exper­tise: Adobe AIR.

He’s com­ing to speak and run a work­shop at the Edge of the Web con­fer­ence in Perth in Novem­ber, so I thought I’d chat to him about his thoughts on AIR.

Hi Kai, thanks for your time! You’re doing a pre­sen­ta­tion and a half day work­shop on a fairly new tech­nol­ogy from Adobe called AIR. What exactly is it, and why is it inter­est­ing to web developers?

Hey Kay, thanks for tak­ing the time to inter­view me *g*.

Ok, let’s maybe start with not­ing that AIR is not new any­more — it was released by Adobe in Feb­ru­ary 08 and was float­ing around in pub­lic alpha and beta releases under the code name Apollo for quite a while before that.

Basi­cally AIR is a desk­top run­time envi­ron­ment for appli­ca­tions. Think about con­cepts such as Java and their Java Run­time Envi­ron­ments (JRE) or Microsoft with the .NET run­time on Win­dows machines (or the Mono project on Linux/OSX) and you’ll come pretty close to the gen­eral idea of AIR — it allows you to exe­cute platform-independent code in a run­time envi­ron­ment on your machine.

Ok, I got that — but what’s the point of hav­ing another run­time envi­ron­ment then? What does make AIR dif­fer­ent and special?

AIR is dif­fer­ent for a few rea­sons. The most impor­tant of all — it’s a run­time envi­ron­ment for the desk­top that lever­ages web tech­nol­ogy. That basi­cally means that you as a web devel­oper will be able to use your skills in build­ing web appli­ca­tions to build appli­ca­tions that run on the desk­top of your user, you can inter­act with the desk­top and there­fore bridge into a totally new envi­ron­ment that the typ­i­cal web devel­oper could hardly reach before. And you would nei­ther have to learn Java nor any .NET plat­form lan­guage to do so — not that I would not encour­age you to learn new languages!

AIR really con­sists of 2 built-in run­times by hav­ing a Flash Player-based part and a Webkit-based part. Webkit is the core HTML ren­der­ing engine of Safari and widely used in other browsers, for instance in Nokia mobile phones. It’s actu­ally cool because that means that it doesn’t mat­ter if you’re a Flash, Flex or HTML/JS devel­oper — you can pretty much right away build appli­ca­tions for the AIR run­time and re-use the skills you have.

The two run­times can even inter­act with each other. So — it’s pos­si­ble to build and deploy a Flex appli­ca­tion in AIR that uses the HTML engine to ren­der full-blown HTML or vice-verse built a HTML appli­ca­tion with JS that uses Flash and Flex. And the best of all is prob­a­bly that your AIR appli­ca­tion will run and behave exactly the same on any plat­form that the run­time is sup­ported on.

Typ­i­cal sce­nar­ios of inter­ac­tion with the exter­nal world — the user’s desk­top — are access to the file sys­tem, a full net­work stack, sys­tem noti­fi­ca­tions, access to the chrome, copy&paste and clip­board data  con­ver­sion and imho best of all — a local SQLite database.

That sounds very inter­est­ing and it appears that it’s a great oppor­tu­nity for web devel­op­ers to bring their appli­ca­tions to the desk­top by using AIR. But with all those ways to inter­act with the user’s machine — what about secu­rity? And how do you get AIR and an AIR appli­ca­tion to your machine anyway?

There are a few things to be aware of when talk­ing about the deliv­ery of AIR appli­ca­tions and also about secu­rity. It’s impor­tant to think of an AIR appli­ca­tion as any other appli­ca­tion. It basi­cally has all the access rights to your sys­tem that you pro­vide it with — like any other appli­ca­tion on your machine. I would strongly advise every­one to avoid using your machine with admin­is­tra­tive or root priv­i­leges and install appli­ca­tions — doesn’t mat­ter if those are Java, AIR, native Win­dows etc. — from a source you don’t know — or even worse — you’ve just down­loaded from “some­where” on the net.

AIR sup­ports the devel­oper in cre­at­ing a level of trust by allow­ing to sign appli­ca­tions with a cer­tifi­cate from a trusted third party, such as Thawte. The user will there­fore know who the devel­oper of a par­tic­u­lar appli­ca­tion was and could decide if to trust that per­son or organization.

The AIR run­time is avail­able from Adobe for free. It’s not open source though as the Flex SDK is. Hav­ing the AIR run­time on your machine, you’d be able to run and install any AIR appli­ca­tion (they come as .air files).

Then there’s the AIR SDK. The SDK com­prises a bunch of class libraries and command-line tools to actu­ally build AIR appli­ca­tions. The SDK is avail­able for free as well.

That sounds awe­some, but in the real world, are peo­ple actu­ally adopt­ing all this cool stuff? Are there appli­ca­tions in the busi­ness, cor­po­rate and gov­ern­ment arenas?

Yes, they are indeed. Obvi­ously as with any new tech­nol­ogy there’s an exper­i­men­ta­tion and adop­tion phase. For AIR that meant that I’ve prob­a­bly seen 5 dif­fer­ent Twit­ter desk­top clients with the first few weeks after release, which becomes tir­ing after a while :)

One of the great ben­e­fits of AIR appli­ca­tions is that they seam­lessly tie into the net as well as into your desk­top. A large use case of AIR is there­fore to bridge a gap between online ser­vices and the desk­top and offline or occa­sion­ally con­nected client world. There are very stun­ning appli­ca­tions out there to inte­grate with ser­vices like Flickr, Digg and var­i­ous blog systems.

Over­seas banks and stock­bro­kers have started to pro­vide their clients with AIR appli­ca­tions to pro­vide a com­fort­able access to their port­fo­lio data. I’ve heard about a large air­line in the south­ern hemi­sphere going to release an AIR appli­ca­tion for their fre­quent fly­ers for book­ing, visual trip plan­ning etc from their desk­top and there are also gov­ern­ment orga­ni­za­tions look­ing into lever­ag­ing AIR as a new way to deploy inter­nal appli­ca­tions to the desk­tops of their employees.

So what are you going to cover in your work­shop? Do atten­dees need any par­tic­u­lar skills? Should they bring their laptops?

Well, the work­shop is going to be a tech­ni­cal work­shop after all. That doesn’t mean that atten­dees have to bring lap­tops, but it will com­prise a bunch of hands-on tuto­ri­als and exper­i­ments that I’d say are just way more fun if peo­ple can actu­ally plan with the files them­selves and cre­ate a small appli­ca­tion on their own.

Atten­dees do obvi­ously not need to know much about AIR. What they need though would be an under­stand­ing of web tech­nolo­gies and pro­gram­ming con­cepts, but a devel­oper who builds HTML-based sites and appli­ca­tions with AJAX would be as able to fol­low as a Flex– or Flash-developer would. It won’t even be a prob­lem if you’ve never build a web appli­ca­tion but you’re work­ing on build­ing desk­top apps with Java, C#, C++ or Cocoa on the Mac instead.

After cov­er­ing the basics, we’ll pretty much jump into some of the more inter­est­ing and “spe­cial” APIs such as File Sys­tem access or the SQLite API. We’ll talk about var­i­ous deploy­ment options, secu­rity, cer­tifi­cates and also tool­ing — most peo­ple would pre­fer to work in some sort of an IDE instead of hack­ing along on the com­mand line.

One impor­tant remark re the required soft­ware — I’ll have a few USB keys with the AIR SDK and run­time for the most com­mon plat­forms and a few other things that atten­dees could use as a starter kit at the begin­ning of the workshop.

If you’re an exist­ing Flex devel­oper look­ing into get­ting into AIR, I’d rec­om­mend using and hav­ing Flex Builder 3 installed, peo­ple com­ing from the HTML/JS side of things could have a look into using Aptana as their IDE of choice.

Be aware that I’m an Apple fan­boy run­ning OS X, so there’s a good chance that I have installers for var­i­ous IDEs for OS X with me, but I might not be able to sup­port you with more than the basic starter kit on Win­dows or Linux :)

Great! Thanks again Kai… Look for­ward to see­ing you at “The Edge” :)

Thanks Kay, look for­ward to see­ing you again soon and meet­ing all the atten­dees over there in Perth!

Comments are closed.