Blog Post RSS ?

Blogs » Flash » Flex 2 is not “all or nothing”
 

Flex 2 is not “all or nothing”

by Kevin Yank

Ever since Macromedia announced Flex 2 and made available pre-release versions, I’ve been gritting my teeth as more and more cool news has surfaced about what Flex 2 will be capable of.

Because Macromedia Adobe will not be offering free licenses for non-commercial users of Flex 2 as it did for Flex 1, I’ve avoided recommending the technology to people despite the steady stream of exciting news that has come with the successive pre-release versions (now Beta 2).

The latest exciting tidbit — which has forced me to grudingly give the platform another look — is that Adobe has developed the Flex-AJAX bridge. The name is slightly misleading, as it’s really more of a Flex-JavaScript bridge, but it does help Adobe fend off some of the perception of AJAX as a Flex killer.

This bridge is an extension library for Flex that, when loaded, allows JavaScript code in a page to communicate with a Flex application, getting/setting property values, manipulating user interface elements, and registering JavaScript event listeners for elements inside the Flex application that would otherwise only be accessible to the ActionScript code within the application. Likewise, the bridge allows the Flex application to reach out into the containing HTML document, get/set form field values, manipulate CSS properties, and register event listeners that will allow the Flex application to respond to JavaScript events.

Where previously Flex was seen as an all-or-nothing platform for web applications, where your Flex application just filled the browser window with a Flash movie containing the user interface, the Flex-AJAX bridge lets you build hybrid applications, with smaller components that can benefit from Flex’s flexibility while the rest of the user experience can continue to be presented using HTML and CSS, with all the added compatibility and accessibility that brings.

To try out the Flex-AJAX bridge, you’ll need the most recent beta release of Flash Player 8.5. You can then check out the simple hybrid store example that Flex developer Christophe Coenraets described in a recent blog entry. The application makes use of the slider component from the Yahoo! User Interface Library to provide some JavaScript-powered controls that allow you to filter a set of results displayed in the adjacent Flex application.

A more detailed example may be found on the Adobe Labs site, which shows off the remarkably simple JavaScript code required to communicate with Flex using the bridge.

I’m still not jumping on the Flex bandwagon just yet, but if the right project came along and the investment were justified… well, you never know.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Ping.fm
  • Twitthis

Related posts:

  1. Tweet Your Flickr Pics with Flex Andrew Muller's Flex-based Twitter app is really taking shape. In...
  2. Add this Flex 3 Pocket Guide to Your Library … for Free! Our latest Adobe-sponsored giveaway is live, and up for grabs...
  3. Find Out What’s New and Cool in Flex 4… and Win! Read our brand new article, What’s New in Flex 4?...
  4. Flex Quiz Time: Last chance to win a copy of… This is the last opportunity for some lucky person to...
  5. Pimp Your PHP App With Flex … And Win! Our latest Adobe-sponsored giveaway is live, and up for grabs...

This post has 12 responses so far

Sponsored Links

SitePoint Marketplace

Buy and sell Websites, templates, domain names, hosting, graphics and more.

Follow SitePoint on...