CFUnited - Andy Powell - Spry And ColdFusion Integration

As a last minute decision I decided to skip Ray's CFC session and attend Andy Powell's session on Spry/ColdFusion integration. Andy's session was divided into four different points:

What is Spry and how does it work.

  • Adobe's framework for AJAX (AJAX made easy).
  • Currently in pre-release 1.5
  • Emphasizes simple HTML markup with minimal JavaScript

What makes Spry tick? Datasets

  • XML - Data is an XML document.
  • JSON - Data is a JSON formatted string.
Widgets
  • Tab Navs, Accordions, Panels
Effects
  • Visual Enhancements (Shake, distort)

How does Spry work? Spry JS data and effects libraries are included in the page.

Benefits of using Spry? Dynamic manipulation of data without using page refreshes. Advanced user interfaces with minimal JavaScript. It's easy.

Creating and loading XML datasets:

new Spry.Data.XMLDataSet("myurl.xml", "root/element")
  • URL of XML (static or dynamic)
  • XPath to the data.
  • Optional (caching, reload intervals)

Creating and loading JSON datasets:

new Spry.Data.JSONDataSet("file.json", {path:"result"})

Displaying and using datasets:

<div spry:region="datasetName">
<div spry:repeat="datasetName">
{datasetName::column}
</div>
</div>

Other dataset object functionality. Sorting - datasetName.sort("columnName"). Filtering (non-destructive & destructive). State awareness (loading, error, ready).

Integration with CF: How can we use CF with Spry? Building XML with ColdFusion (make your database do the work - have SQL return a query as XML). Build JSON with ColdFusion (native in CF 8). Use cfcontent to set the MIME type.

Whats new in CF8? CF 8 brings a strong focus on AJAX to CFML. Provides both tags and functions to aid AJAX development in general. New functions: serializeJSON(), deserializeJSON(), isJSON(). New tag cfsprydataset. cfsprydataset uses bind attribute like many other AJAX features in CF 8.

Comments

Calendar

Sun Mon Tue Wed Thu Fri Sat
  12345
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31   

Subscribe

Enter your email address to subscribe to this blog.

Tags

actionscript ajax blogging cfsnippets coldfusion flash forms flex misc model-glue off topic personal project learn slidesix sql

Recent Comments

More CF+Java: Compiling Classes And Persisting Objects
Getburl said: I have been attempting to get Db4o working in my CF application and I have not succeeded. I would lo... [More]

Thoughts On Ajax Frameworks And ColdFusion/Adobe
Erast said: http://fanniecollins.10gb... emo http://gracetrevino.phree...... [More]

Extending Ext With Ext Extensions
Erast said: http://fanniecollins.10gb... emo http://gracetrevino.phree...... [More]

CF Needs An Open Source Contact List Importer
Kay Smoljak said: Heh, the fact that sites DO it doesn't mean they SHOULD. To us it's ok, but to a non-tech-savvy user... [More]

A Few Project Updates
Helena said: Now punctually what is the situation ? [More]

RSS


coldfusionbloggers

FullAsAGoog MXNA

Consumed By Feed-Squirrel.com