CFLib gets a dose of fresh air...

This post is more than 2 years old.

Yes, the AIR jokes are probably getting a bit old. ;) Yesterday I wrote up a quick demo for a off-site (not offline, but off web site) that demonstrates a CFLib browser. Spry is used to speak to the web site. I used the same code I wrote for the SnipEx service. This meant no back end changes in CFLib, but it also meant I didn't get back as much data as I would like. But as I was just playing, I got over it. I also made use of Paged Datasets and Spry tabs for layout.

I begun my development on my own web server. In order to facilitate moving back and forth between a normal web site and AIR, I used code like so:

var mode = 'prod'; if (mode == 'dev') { //dev var liburl = "data.cfm?loc=" + escape(''); var udfurl = "data.cfm?loc=" + escape('') + "{libs::@id}"; } else { //air var liburl = ""; var udfurl = "{libs::@id}"; }

Basically, in the non AIR mode, I used a proxy CFM, and in AIR, I didn't have to.

I didn't use Aptana's AIR support as I had some issues with it recently. Instead I simply used the command line. I blogged in the past about this, so I won't repeat it, but the process was pretty much the same under AIR Beta 3. The main difference was having to create a self-signed certificate first. It would be nice if AIR supplied a "one step" compile for that, but it wasn't too hard. Obviously if you use something like Dreamweaver it would probably be simpler.

The biggest issue I had was with Spry and AIR. I blogged on that last night. That was the critical thing I was missing. This app represents probably 4 hours of work, of which 3 was me banging my head against the wall on the AIR/Spry stuff. Now that I know though - it definitely makes sense.

So let me know what you think. I know the design sucks, but I kind of like it. I'm considering adding it to my taskbar (yes, I'm considering avoiding my own web site - is that sad?) to force myself to use it and add features to it.

The zip contains my original code plus the AIR installer. Just so it's obvious - I'm still learning this stuff, so don't mistake this for 'best practices' AIR development. ;)

Download attached file.

Raymond Camden's Picture

About Raymond Camden

Raymond is a senior developer evangelist for Adobe. He focuses on document services, JavaScript, and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA

Archived Comments

Comment 1 by Dave Hoff posted on 12/18/2007 at 11:48 PM

Got this message when trying to install the app.

This application requires a version of the Adobe Integrated Runtime (AIR)
which is no longer supported. Please contact the application author for an
updated version.

Comment 2 by Raymond Camden posted on 12/19/2007 at 12:03 AM

I used Beta 3. Is that what you are on?

Comment 3 by Dave Hoff posted on 12/19/2007 at 12:57 AM

That was it, I was on an earlier version.

Very useful app btw. Thanks.