Welcome!

AJAX & REA Authors: John Funnell, Bob Little, Kevin Hoffman, Maureen O'Gara, Onkar Singh

Related Topics: AJAX & REA, ColdFusion, Adobe Flex

AJAX & REA: Article

Simplifying AJAX with the Spry Framework

Delivering great experiences while fitting the workflows and skill sets of both designers & developers

Implementing an Effect
Spry Effects are added to your page in two steps. First, you must include the appropriate JavaScript library:

Second, add an event handler to a supported element (e.g., <a> tag). Note: Supported elements differ by effect - please refer to the Spry API docs.

For each effect, you must set the target element to which you want to apply the effect. The element parameter can be either a string containing the id of the element or a JavaScript DOM element object. In the example above the AppearFade effect will run on the "target" element when the user clicks on the <a> link. If the target element is a <div id="products"> tag, you would pass in "products" as the target parameter.

Effect Composition
Spry effects are created by combining core effects. The core effects include:

The combined effects of the Spry framework include: Spry supports the ability to cluster effects together to create your own variations. This is done by using the Cluster effect that acts like a container for multiple core effects. Like a regular effect, the Cluster effect has a start() function. But unlike regular effects, Cluster provides the methods addNextEffect() and addParallelEffect(). These functions let you chain effects together to create new variations.

Clustered effects are a flexible mechanism for creating new effect variations (see Figure 9). However, they require some JavaScript programming knowledge. Please refer to the Spry API docs for more information.

What's Next for Spry?
Our goal in putting Spry on Adobe Labs was to make it an open technology that could be driven by customer feedback. This method has produced great results for our engineering team and our customers. We continue to use your feedback on the forums to help guide Spry's future direction. Spry is currently in beta with official release scheduled for early spring, 2007. This new release will include support for JSON and nested Data Sets.

Besides the official release of Spry on Adobe Labs, we'll be shipping a new version of Dreamweaver with support for Spry Data Sets, Widgets, and Effects.

Spry is a free download and can be accessed on Adobe Labs using http://labs.adobe.com/technologies/spry/.

More Stories By Paul Gubbay

Paul Gubbay is a director of engineering at Macromedia. Previously, Paul held the role of CEO at CyberSage Software, where he spent several years building the vision and infrastructure of the company. Under Paul's guidance, CyberSage focused on emerging technologies such as XML, Java, and Macromedia Flash to deliver leading edge product offerings.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.