Wednesday, February 27, 2008 by Mistlee
Build A Simple Adobe AIR Desktop Application Using HTML & JavaScript
By Pete Freitag
I spent a some time recently preparing for the Adobe AIR & Flex 3 Launch Event at my ColdFusion user group. One thing I wanted to show people was how to build a simple Adobe AIR Desktop Application using HTML & JavaScript.
I found the AIR Platform to be both powerful, and very easy to develop with. You really just have to spend a few minutes to see how easy it is!
I mean no disrespect to Flash, and Flex but the single most appealing capability of Adobe AIR is that you can build desktop applications in JavaScript and HTML. Two languages that nearly everyone reading this blog has undoubtedly used, and is probably quite good at already.
Adobe AIR also has an embedded database SQLite, which is an SQL92 & ACID compliant database engine with support for storing databases of up to 1TB. You can use this embedded database in your AIR Apps, and send SQL queries to it using JavaScript! The learning curve for building an Air Application if you already know JavaScript and HTML is quite small. Run through this quick tutorial and you will be unstoppable!
Step 1 - Install Adobe AIR & the Adobe AIR SDK
If you haven't done so already, head over to Adobe to download and install the Adobe AIR Runtime, and the Adobe AIR SDK.
When you install the Adobe AIR SDK, you will want to add it's bin/ directory to your environment path.
Step 2 - Create Some Directories
Next we need to create some directories for our code, create the following directories:
/appname/ /appname/source/ /appname/source/icons/ /appname/build/
Step 3 - Create an Application Descriptor
Your application descriptor is an XML file that sets some properties for your application.
Let's call this file application.xml and place it in /appname/source/
com.example.appname 1.0 AppName index.html true 600 600 icons/appname-16.png icons/appname-32.png icons/appname-48.png icons/appname-128.png
It should be pretty obvious what to put for all the values, the icon values will be used as your application icon, you can omit these if you don't really want to create the PNG's, but it's kind of cool to see your own icons.
There are a lot more optional tags you can add, check out the templates/descriptor-template.xml file in the Air SDK. | |
|
0 comments:
Post a Comment