« Slides from Flashforward 2006 | Main | Some personal thoughts on the Flex/AJAX Bridge... »
March 8, 2006
FAB - Flex / AJAX bridge
FAB - Flex/AJAX Bridge - is a library created by Ely Greenfield, who is a good friend and Flex Architect.
FAB lets you control Flex applications using JavaScript. Method calls just work, and getters and setters are converted to method calls (because browsers don't support getters and setters yet).
You can even attach event listeners from JavaScript and pass function objects back and forth. For example, you can create an MXML file with a button in it and drive all of the logic from within your HTML/JavaScript.
MXML:
--
<mx:Application xmlns:mx="http://www.macromedia.com/2005/mxml">
<fab:FABridge xmlns:fab="bridge.*" />
<mx:Button id="okButton" label="OK" />
</mx:Application>
JavaScript:
--
function init()
{
var flexApp = FABridge.flash.root();
flexApp.okButton().addEventListener("click", handleClick);
}
function handleClick(event)
{
// handle the click event here.
}
You can read more about it on Ely's blog, which I predict will be worth reading.
http://www.quietlyscheming.com/blog/2006/03/06/flex-and-ajax/
Posted by sho at March 8, 2006 9:07 AM