Showcase

1 comment0 views
1 Star2 Stars

Flex Ajax Bridge

Category: Flex Examples    |    167 views    |    1 Comment

The Flex Ajax Bridge (FABridge) is a small code library that you can insert into an Flex application, a Flex component, or an empty SWF file to expose it to scripting in the browser.

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. After you insert the library, essentially anything you can do with ActionScript, you can do with JavaScript.

Adobe Flash Player has the native ability, through the External API (the ExternalInterface class), to call JavaScript from ActionScript, and vice versa. But ExternalInterface has some limitations:

  • 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.
  • The ExternalInterface class lets you define an interface so your JavaScript can call your ActionScript. FABridge lets you write JavaScript instead of ActionScript.

When to use the Flex Ajax Bridge

The FABridge library is useful in the following situations:

  • You want to use a rich Flex component in an Ajax application but do not want to write a lot of Flex code. If you wrap the component in a FABridge-enabled stub application, you can script it entirely from JavaScript, including using JavaScript generated remotely by the server.
  • You have only one or two people on your team who know Flex. The FABridge library lets everyone on your team use the work produced by one or two Flex specialists.
  • You are building an integrated rich Internet application (RIA) with Flex and Ajax portions.Although you could build the integration yourself using ExternalInterface, you might find it faster to start with the FABridge.

Requirements for using the Ajax Bridge

To use the FABridge library and samples, you must have the following:

Rich Internet applications (RIAs)

Category: flex tutorials    |    157 views    |    Add a Comment

What is a rich Internet application?

In the late nineties, “browsing the web” meant going online to read text and view static images. But that model was limiting. As the number of Internet-connected businesses and individuals increased, so did the demand for richer, more responsive user experiences.

In 2002, Macromedia coined the term rich Internet application (RIA). RIAs combine the flexibility, responsiveness, and ease of use of desktop applications with the broad reach of the web. RIAs provide a dynamic web experience that is rich and engaging, as well as interactive.

Many web designers and developers use Adobe Flash or Adobe Flex, which are part of the Adobe Flash Platform, to build RIAs. Flash is an authoring environment for creating rich, interactive content for the web. Flex is a cross-platform development framework for creating RIAs. Content created with Flash and Flex is deployed using Adobe Flash Player. RIAs created in Flex, Flash, and even Ajax can also be taken to the desktop using the Adobe AIR desktop runtime. To learn more about RIAs, explore the resources below.


See RIAs in action

Flex Tricks

Category: Flex Examples, flex tutorials    |    159 views    |    Add a Comment

Top Things You Need to Know When Working With Flex
Explore the key features of Flex with code examples and working sample applications. These step-by-step code-based tutorials are written in easy to digest 15 minute chunks. We suggest going through them (at least glancing at them) in order, but you can also pick and choose among the topics if you’re already familiar with the concepts:

A. Working with Data
Use data modeling and data binding when working with data.
B. Handling Events
Use event handler functions to handle asynchronous network and UI events.
C. Designing a UI: Using Components and Containers
Use Flex’s built-in components and containers to lay out your Flex Application
D. Designing a UI: Displaying Lists of Items
Use the powerful List based components of Flex to display groups of related data items using either the built-in or custom item renderers and item editors.
E. Designing a UI: Creating a multi-page application
Use navigation controls such as ViewStack and TabNavigator to easily add a navigaton system to your applicaton.
F. Extending and Customizing Components
Create your own components from scratch or by extending existing classes in the Flex Class Library using Object Oriented Programming and Code Behind Techniques.
G. Debugging an Application
Learn about Flex Builder’s rich debugging capabilities.
Import these projects into Flex Builder
Each of these modules is available on the Download Projects Page as exported ZIP files that you can import into Flex Builder.

Share/Save/Bookmark