Friday 13 March 2009

Drupal module finder Flex - AIR application

Hi,

Recently I began learning Flex. The idea was from my boss and a girl who linked an adobe site with a LOT flex video on it. (Thanks @SquirrelMaster) http://www.adobe.com/devnet/flex/videotraining/ - check it

In the Drupal world there are two important buzzwords related to Flash: Druplash and Druplex. In a nutshell, these words cover the intelligent way that a Drupal application and a Flash application can communicate between each other. The basic idea behind this is the usage of Drupal as a back-end (information source) and the Flash as a better way to visualize the datas. To embed a flash game, video or a file/image uploader is not communication at all. As far as I know, it is very new field, however, there are quite a lot interesting idea there isn't any world changing way to implement it. If you interested in it, here you are some links to dig:

SWFObject provide a better way to add flash content to your HTML. It checks the client's flash player and browser capabilities. And if the environment unable to render your SWF appropriately, it displays an alternative content -> in the SEO side, makes your page readable for robots.
http://code.google.com/p/swfobject/

With SWFAddress your flash object can communicate with the JavaScript on the same page. Thus JavaScript can send a state (like the url) about the site (and from the url the flash can restore some action or timeline state - for example if the url is www.mywebshop.com/#shoes, it loads the shoes page). And of course vica-versa. Flash can send it's state to javascript and with that the javascript can modify the url for example. If its seems useless just think about sending a url for your friend. If the flash site can't handle the url, it always shows the home page.
http://www.asual.com/swfaddress/

Drupal has a module called Services. It defines a bunch of services (user services, node services, ...etc) and supports several layers to communicate (HTTP, RPC, XML-RPC, SOAP). The work-flow abstraction is quite simple. You send a request to the Drupal site, it does something (get data) and send back to the caller. The real power that you can create any custom services easily and with it you can retrieve any the information you want from Drupal.
http://drupal.org/project/services

AMF is a message format Flash use in transactions. It's binary, so mush more smaller than an XML message format. AMFPHP is a converter from AMF to PHP native format.
http://www.amfphp.org/

AMFPHP porting to Drupal.
http://drupal.org/project/amfphp

There are some slides about Druplash and Druplex:


Anyway. I fell in love with Flex. The reason I'm writing this post I developed a small application that helps searching Drupal modules on your desktop. How? With AIR. Unfortunately you have to install the desktop flash interpreter tool: called AIR player. It's more or less the same as Flash Player with a minor difference, it have the flash ran on desktop. Another interesting development: http://www.openscreenproject.org/ Adobe put the SWF and FLV/F4L technology to free license and strives to ease running flash applications on different devices. You know, now it's not the best on a unix based distro. But, ... at least you have the option for it.

So, back to my Flex app. If you want to try, you can download from here:
http://www.bison.hu/public/drupal_module_search_v01.air

Adobe AIR player is available at here:
http://get.adobe.com/air/

I can imagine a lot Flex application which can help the Drupal development. Making this was't more than 2 hours. Well, I know, it doesn't do too much as well.

If you have a creative idea that would be great to implement with Flex, please tell me. I'd be pleased to hear any feedback.

Thanks,
Peter

No comments:

Post a Comment

Note: only a member of this blog may post a comment.