"No, Kiddo, this moment... this is me at my most masochistic." -- Bill

In what may be construed as an exercise in stupidity, i present you Zeke, an all-Flash Drupal 7 development framework. Presenting it to the tech-savvy/open-source-inclined Drupal crowd in these Flash-bashing days is definitely begging for trouble, i'll give you that.

What's the point, you may ask? Why not just stick with good ol' HTML, to the pleasure of Steve Jobs and the ACFA  - the Anti-Flash Coders Association? Or just forget about HTML altogether and remain in Flash's isolated, CPU-intensive dreamland? Well, i still wonder at times. But i was looking for the best of both worlds: the ability to manage content easily, to show a little friendliness to search engines, while retaining the absolute creative freedom Flash provides. And Drupal has been instrumental in this on-going quest, however Quixotesque it may be.

Framework Overview

Zeke is at its core a paging system which behaves in a manner similar to HTML from a navigational standpoint: user clicks, a page is loaded. But contrary to HTML, it provides seamless animated transitioning between page loads while graphical assets are loaded and node content retrieved from the Drupal core using a Zend AMF gateway.

And thanks to SWFAddress, the resulting application is no longer limited to siphoning traffic through the homepage -- it is possible to target any sub-level page. Here's how it proceeds: user requests a page, say this very page, http://obstacle.com/drupal_flash, which is a search-engine-friendly HTML page; using SWFObject, an attempt to detect Flash is made. If successful, the user is redirected to the application at root along with an anchor -- http://obstacle.com/#/drupal_flash -- allowing the Flash application to retrieve the appropriate internal page. You have Flash, but you still wants HTML? Head over to http://obstacle.com/html/drupal_flash. Try it, it's that simple (don't worry, the back button will take you back right here; and you won't even see this comment :)

Zeke's Flash portion consists in the following SWFs: a loader, a base container, and a default template. The loader loads the base container, which initializes the environment (generates global menus, wrapper environment, ... the rough equivalent of "page.tpl.php"), then connects to the Drupal code to retrieve the requested node's data, and finally loads the necessary graphical assets contained in a SWF, based on node type (similar to "node--type.tpl.php") or node id (similar to "node-24.tpl.php"). You could technically not generate any SWF templates and you'd end up with a text-only all-Flash website; but since we're using Flash to add a little pizzazz, we definitely want to generate our own.

Zeke in action:


What's next?

Flash is taking a quite a beating these days, so there may not be a "next". Alright, alright, i'm being a little melodramatic here : there will _ALWAYS_ be a need for Flash. By that i mean there will always be a need for a toolset that provides help in generating a richer user experience. High hopes are set in HTML 5, but i can't help feeling a little cynical in the face of corporate unity in developing open standards (can you spell DHTML?).

We're confronted to a web population still wrestling to untangle itself from IE6, how can we expect a better penetration rate than Flash anytime soon? And even if HTML5 does evolve into an actual standard, can i expect, as a designer, that whatever i produce will be have a consistent look on any platform, that corporations won't mangle the standard to create some kind of lock-in mechanism à la IE6?

Flash is here, it's everywhere, and it works. Now. And better yet, it's OS agnostic -- arguably the closest at making a reality out of Java's promise to "Write once, run everywhere". At the time of writing, it was enjoying a 96.65% support (StatOwl); and with Flash, you know every pixels will be reproduced faithfully, regardless of platform. 

Of course, i can hear some of you out there: "it's not open-source!". Yeaaaah...  it bugs me a little too. However, this website has been developed without Adobe's Flash IDE (barred a couple of lazy cheats). It was coded with the most excellent free and open FlashDevelop (http://www.flashdevelop.org), and compiled using tools provided with Adobe's free and relatively open Flex SDK, so one can create without paying a dime to Adobe (AFAIK, IANAL). Sure, it'd be nice thought to have the whole shebang was open, but hey, Adobe's definitely not at the top of the Evil Doer Scale here.

So in the end, i don't feel this is all in vain, nor do i feel threatened by HTML5. Sure, it's bound to have short-term bearing on my situation, but it's fair to assume most of code, and more importantly, most of the knowledge, can eventually ported. And discovering Drupal along the way makes it all worth its while. But i feel reassured knowing this little secret, a truth you too will have to face eventually that is sure to bug a few out there:

HTML5 wants to be Flash. 

A different kind of Flash maybe, but a Flash nonetheless -- a richer, more animated and asynchronous HTML. So whatever problems some of you may have with Flash right now, is likely to be carried over to HTML5 down the line. And to make matters worst, there won't be this corporate entity that can easily be dissed and dismissed: it'll be integrated in your toolset, with no chance of removal.

A wise man once said: "Remember... with great power (creative freedom), comes great responsibility (using it in an efficient manner)". In the end, Flash was never really the issue; the problem was us darn clueless designers, who took over Flash from the gitgo. Remember those pointless 5MB intro, with the "Skip Intro" and the neverending "Loading..."? Or those clunky animations, proud descendants of the notorious <blink>?

They're all coming back soon to haunt you on an HTML5 site near you!

"Pai Mei taught you the five point palm-exploding heart technique?" -- Bill, The End

Is there a future for this Flash/Drupal framework beyond this website? Well... maybe. In its current state, it is being presented as a proof of concept, a customized toolset at best. A few sites have already been produced using Zeke -- all on very tight budgets, might i add -- so it has definitely been helpful in increasing Flash development productivity. In that regard, it has already achieved its primary goal; now, i'm hoping it will achieve another, that of spending less time on coding and more time on creative work.

As for a public future, that is still up for grabs. Part of the reason why i wrote this blog (or took up blogging, come to think of it) was to test the waters and gauge potential interest from the community.  Drupal is expanding into uncharted territories: Ajax, JQuery, Flash, HTML 5, all impose new ways to conceiving websites, forcing us to think differently, a reality we're being confronted with more and more everyday. And this trend is likely to expand with capable mobile devices and interactive TV sets entering the fray. If this project is successful in shining some light on that reality, it will have serve its purpose.