Archive for the 'air' Category

Using Prototype with Adobe AIR

Monday, October 29th, 2007

Long story short: I found out the hard way that Adobe has nerfed the AIR runtime so that any JavaScript functionality that relies on the eval() function doesn’t work*. Sweet.

I’ve been wanting to play with AIR more, but every time I get into this system I find myself banging my head on the wall. I wanted to start a personal project with AIR - just something to remember and search some notes for now. I had a nice little JavaScript MVC framework going on. I was dispatching events related to commands… those events were being dispatched to the correct controllers… the controllers were… not rendering any view code. Crap.

The problem lies in the way AIR nerfs eval() functionality in Prototype. Something as simple as $(’id’).update(data) doesn’t work because String.update (along with most AJAX functions) automatically eval() script segments in the strings they work with.

* Okay, so you can get it to work, but you have to split out your main HTML interface into an iframe and create a bridge between the two sandboxed areas (the AIR-enabled root HTML file, and the AIR-nerfed, Prototype-enabled iframe. Yuck.

If anyone has any ideas how to get around this, that’d be nice. I suppose I can see why Adobe would be careful about allowing developers to eval() anything they like, but the proposed solution is really nasty and doesn’t solve anything anyway.

Prism

Friday, October 26th, 2007

The buzz on the web today is all about Mozilla’s new experiment, dubbed Prism. At first, I was thinking, ”
Hey - this is just like Adobe AIR, minus the flash, but it’s probably open source.” I think competition for AIR is healthy, and while Adobe is usually a benevolent monopoly, it’d be nice to be able fall back on some open source web-to-desktop software. Why did I think this? The Prism site compares itself to Silverlight and AIR:

Unlike Adobe AIR and Microsoft Silverlight, we’re not building a proprietary platform to replace the web. We think the web is a powerful and open platform for this sort of innovation, so our goal is to identify and facilitate the development of enhancements that bring the advantages of desktop apps to the web platform.

Then I read the rest of the article.

Essentially, Prism looks like an extra nice way to bookmark sites you use on the web. It’s like Firefox minus Chrome. “LabRats,” the author of the announcement responds to the critique of an AIR fan in a way that confirms my disappointment:

…we don’t do anything to close the web platform. We simply provide you with a dedicated window to an application running on that platform. It’s the same as if you had opened a new window in Firefox and loaded the application there, but without the browser chrome to get in your way.

Leave it up to Web 2.0 to hype up something product that actually offers less than it’s predecessor.

 
random side bar image...