Log in

No account? Create an account

RESTful Flex

« previous entry | next entry »
Nov. 16th, 2004 | 11:41 pm

Yesterday, in response to a post by Jon Udell raising concerns about the web-friendliness of RIAs, Kevin posted an example Flash-based RIA that incorporates URI-based REST.

The ability to jump to any state in an application by specifying the right parameters in the URL (by loading a previously bookmarked page), and the ability to navigate between states using the Back and Forward buttons, is one of the important features of web-based applications.

From Jon's blog today:

I'd be interested to know what you (and other Flash developers) think of the feasibility and/or desirability of making this capability automatic (optionally) for certain core widgets. So a tree control, for example, could be made reveal its expansion state on the URL-line, or a data-bound widget made to expose its query, just by flipping a switch.

The good news for Flex developers (and all RIA enthusiasts) is that history management comes built into some Flex components, and can be easily enabled for others. So, a tree control or a data-bound widget can save and load its state from the browser's history. Using a combination of Kevin's technique and Flex's built-in history management, it is also possible to reveal the state in the browser's address bar (for easy bookmarking). Moving forward, we would like to enhance Flex's history management to support REST.

I ported Kevin's example to Flex. My version combines Flex's history management with Kevin's REST technique to deliver a better browsing experience. Look for FlexExample.mxml, FlexExample_script.as and FlexIndex.html in the archive.

I take this opportunity to remind you that Flex 1.5 is a free download from our website. It's the easiest way to build applications for Flash (the most widely deployed application development platform ever). Haven't you got your copy yet?