Monday, April 27th, 2009 Posted in FITC Toronto 2009

Session 3: Strategies for Integrating Flash with Drupal

Awesome session! Lots of practical information. Full code samples. fitc.sisutastic.com

Commercial web apps using Drupal: The Onion, Infoworld, Fast Company, Nonesuch

-SEO! Publish views for Flash and Static HTML. Able to publish for multiple front ends.

3 systems:
-Create a view for dynamic embed of flashvars
-Create an HTML view and consume that content into Flash (parse as XHTML or XML)
-Create native actionscript objects with AMFPHP. Small, Fast. This connection allows for 2 way communication; writing in to the Drupal CMS

Modules:
-Services Module (AMFPHP gateway) (Also can create JSON object, good if one wanted to create an AJAX version of the same content)
-CCK Module – expands on properties available when createing a content object
-Views Module – What we use to create our data object
-SWF Address Module (optional)
-Admin Menu (optional)
-Also need to get Core Lib from Adobe

In Drupal a ‘node’ is the native content object, a view is a filtered collection of these objects. AMFPHP is the data gateway; requests will go to /services/amfphp with query string. In Flash we need to import net.responder, net.netconnection, net.objectencoding. AMFPHP returns a native Flash object.

-sidenote: was not familiar with setting breakpoints in actionscript and using that to run code only to a specified point in the debug player.

-create encoded keys in Drupal to authenticate session information.
-use a singleton class to store session information and call public methods.

Thoughts:
Admittedly I am a fan of open-source, off the shelf solutions. I love wordpress, and we have scratched the surface of flash integration in WordPress themes. The interesting thing about Drupal integration, is that we can use it solely as a CMS and easily create custom data objects with the views module and package them in a native Flash object. Increases speed of retrieving data, no need to transform PHP and HTML into a format that is easily parsed by Flash. Also allow creation of a variety of front-end interfaces. Create data views for flashy Flash front-end, Static HTML pages for SEO, and HTML and JSON versions for non-flash, but still rich browser based experiences like iPhone all from the same data source, and all in a very user friendly admin back-end.