RESTful Flash plus Flex history

RESTful Flash plus Flex history.

After Kevin Lynch was gang tackled for failing to integrate his Flash deep-linking example
with the browser's history navigation (Back/Forward), I recalled that
Flex includes a history manager that's intended to support just that
kind of integration. Manish Jethani, a Macromedia developer, has
created another example
that shows how Kevin's technique can be combined with the Flex history
manager. (Manish's source code has now been incorporated into Kevin's downloadable archive.)
I tried the new example using Flex 1.0 and, although Manish tells me
there were no changes in history management between 1.0 and the new
version, 1.5, I'm not having much luck getting it to work. I'm quite
curious to see this in action, so I'm upgrading to Flex 1.5 as we
speak, but if someone can point to a live instance of Manish's example
running on a Flex 1.5 server I'm sure a number of folks would be
interested to see it.

The Flex documentation on history management is here, and the best third-party write-up I've found is this essay
at TalkingTree.com. It looks straightforward to implement the
state-saving and state-loading methods in a component and then register
it with the HistoryManager. But the plumbing is a bit daunting. There's
backchannel communication of auxiliary .SWF files from the Flex server
to the client, use of an invisible frame on the client, and JavaScript
glue to wire everything together. And of course, the machinery has to
be merged with the URL-line synchronization that Kevin demonstrated.

Can all this stuff be simplified and — crucially for widespread
acceptance — made independent of the Flex server? I think that's an
important challenge for Macromedia, as well as an opportunity for the
newly open-sourced Laszlo platform. Where there's a will, there's a way.

Update: The example does require Flex 1.5, and it also requires
Internet Explorer. (Well, it sort of works in Firefox — you can use
the browser's Back and Forward buttons, but the URL-line doesn't synch.
I'd be interested to know what's need to solve this.) You can try the
modified example here. If you can't run IE, or in case I take that server down, here's a quick screencast that shows how it works.
  [Jon's Radio]

Leave a comment