Oracle Magazine Special offer for AjaxImpact.com Visitors!! Subscribe to Oracle Magazine for Free!
AJAX IMPACT



AJAX NEWS
Adobe Introduces FABridge - an Flex AJAX Bridge
04/18/2006, By Ajax Impact News



Adobe Labs has recently introduced FABridge, an JavaScript library that enables the developers to easily integrate the Flex applications with Ajax or DHTML code running in the browser.

The Flex-Ajax Bridge (FABridge) is a small, unobtrusive library of code that you can insert into a Flex application, a Flex component, or even an empty SWF file to expose it to scripting in the browser. It is being released to the community under an open source license.



To humbly borrow a page from the Ruby on Rails community, FABridge is built with the “don’t repeat yourself” principle in mind. Rather than having to define new, simplified APIs to expose a graph of ActionScript objects to JavaScript, with FABridge you can make your ActionScript classes available to JavaScript without any additional coding. Once you’ve inserted the library, pretty much anything you can do using ActionScript, you can do using JavaScript.

Flash Player has the ability natively, through the External API (the ExternalInterface class), to call JavaScript from ActionScript and vice versa.

Some of limitations of ExternalInterface are:

  • The ExternalInterface class requires you, the developer, to write a library of extra code in both ActionScript and JavaScript, to expose the functionality of your Flex application to JavaScript, and vice versa.


  • The ExternalInterface class also limits what you can pass across the gap – primitive types, arrays, and simple objects are legal, but user-defined classes, with associated properties and methods, are off-limits. You’re limited in what you can do.


  • The ExternalInterface class enables you to define an interface so your JavaScript can call your ActionScript – FABridge essentially lets you write JavaScript instead of ActionScript.


  • You can use the FABridge library to automatically expose your Flex application to Ajax-based HTML applications. Using the bridge, you can easily embed rich Flex components in your applications, integrating them tightly with the rest of the page content. Once a Flex application is enabled through the bridge, JavaScript developers have access to all of the functionality it provides.

    Use the Flex-Ajax Bridge in following situations:

    1. Want to use a rich Flex component in an Ajax application but don’t want to write a lot of Flex code. If you wrap the component in a bridge-enabled stub application, you can script it entirely from JavaScript – including using eval()’d JavaScript generated remotely by the server.

    2. Only have one or two people on your team who know Flex. While I would strongly encourage everyone to grab a copy of Flex and try it out (you’ll love it, I promise!), the FABridge library allows everyone on your team to use the work produced by one or two Flex specialists.

    3. Are building an integrated RIA with both Flex and Ajax portions. While you could build the integration yourself using ExternalInterface, you might find it faster to start with FABridge as a head start.

    Download the FABridge

       Explore FABridge now....


     Rate this Ajax News
     Rating: 10.0 out of 1 vote cast

    AJAX NEWS
    04/01/2007 wxJavaScript : porting wxWidgets to JavaScript.
    03/31/2007 DED|Chain - The web developers JavaScript Kit
    03/30/2007 Clipperz Crypto Library - a JavaScript library of crypto primitives
    03/28/2007 ETech - AJAX Unplugged Slides
    03/27/2007 Stripe Generator: ajax powered web 2.0 tool!
    03/26/2007 Finally Microsoft joins the OpenAjax Alliance


    INDUSTRY NEWS
    05/19/2006 Ajax grabs center stage at JavaOne, By Tony Baer
    05/15/2006 Oracle to boost AJAX, Java , By Paul Krill
    05/13/2006 Open AJAX Group Drafts Development Plans, By Stacy Cowley
    05/13/2006 AJAX Powers Interactive Marketing ASP, By AjaxWorld News Desk
    05/12/2006 AJAX Experts Tackle Security, Other Issues , By Darryl K. Taft
    05/11/2006 Adobe Releases Spry Framework for AJAX, By AjaxWorld News Desk
    More 
           

          © 2008 ajaximpact.com. All rights reserved.