Latest Web News

New interactive digital map spills secrets of...
A new interactive digital map developed by an Australian software designer uses the Google Earth paradigms extensively to bring to life the evolution of Australian coastline on your desktop. The transition of...

Aussie game developers want government support
One of the world's biggest entertainment industries is struggling to survive in Australia because of the Federal Government's refusal to help it, a leading gaming group says. The Game Developer’s Association of Australia has criticised the Government’s lack of support to the...

Qantas faces hits on YouTube
A major airline union will launch a global campaign on YouTube aimed at enlisting customer support against Qantas moves to slash the base pay of new customer service staff by more than $3000. The Australian...

CSIRO hinders new wi-fi system
Australia's CSIRO has emerged as a big stumbling block in the ratification of a proposed global wireless standard that would speed home-office networks by a factor of 10. In an email last week, CSIRO refused to provide a "letter of assurance" to the Institute of Electrical and...

Wotif.com bids $50m for Travel.com.au
Online accommodation search Web site Wotif.com has made a AU$49.8 million off-market takeover bid for Travel.com.au (TVL). Wotif.com is offering TVL shareholders either AU$0.50 in cash per TVL...

Next G laptop cards speed access
Telstra's move last week to double the speed of access to its Next G wireless broadband service has to be applauded. Users can now connect their laptops to the internet at up to 6Mpbs pretty well anywhere around Australia, deep valleys and remote bush (sans...

10.03.07


Code From ColdFusion Boot Camp & Tip About ColdFusion 8 And JSON

By Raymond Camden

I just gave a quick CF Boot Camp at MAX on using ColdFusion to send data to Spry. It covers going from static to CF6, CF7, and CF8 dynamic data.

I've zipped up the code below. Note that it makes use of a database you won't have (I'll try to use the art gallery from now on) and I've removed the personal pictures of my kids.

So during the boot camp I talk about how cool it is that you can now call a CFC and ask for JSON back. No need for my toXML .cfc anymore. No need for a 'proxy' CFC. You just call your CFC and get your data back. Sweet.

This is cool but as I've blogged before, there are two ways a query can be represented in JSON:

1. An array of column names and an array of data arrays.

2. A object with a value for the number of rows, an array of column names, and an object where each key is a column name and the value is an array of data.

These two options return different types of data and impact how you would use them in Spry. The SerializeJSON function lets you toggle these two options. However - when using returnFormat="JSON" in a CFC call - I wasn't aware of how to toggle this. Todd Sharp pointed out to me that another new URL parameter you can pass to a cfc is:



Cost Effective Website and Network Monitoring
IPCheck Server Monitor - Free Download

This takes two values, row and column. The row version matches option 1 above, and column matches option 2. From the zip, here is how I called my CFC from Spry:



Download

Comments

About the Author:
Raymond Camden, ray@camdenfamily.com
http://ray.camdenfamily.com

Raymond Camden is Vice President of Technology for roundpeg, Inc. A long time ColdFusion user, Raymond has worked on numerous ColdFusion books and is the creator of many of the most popular ColdFusion community web sites. He is an Adobe Community Expert, user group manager, and the proud father of three little bundles of joy.

About DevWebProAU
DevWebProAU is for professional developers ... those who build and manage applications and sophisticated websites. DevWebProAU delivers via news and expert advice New Strategies In Development.

DevWebProAU is brought to you by:

SecurityConfig.com NetworkingFiles.com
NetworkNewz.com WebProASP.com
DatabaseProNews.com SQLProNews.com
ITcertificationNews.com SysAdminNews.com
LinuxProNews.com WirelessProNews.com
CProgrammingTrends.com NetworkNewz.com



-- DevWebProAU is an iEntry, Inc. publication --
iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509
2007 iEntry, Inc.  All Rights Reserved  Privacy Policy  Legal  

archives | advertising info | news headlines | free newsletters | comments/feedback | submit article


Delivering IT Solutions DevWebProAU News Archives About Us Feedback DevWebProAU Home Page About Article Archive News Downloads WebProWorld Forums Jayde iEntry Advertise Contact