Seamless Integration of Multiple Front Ends Using CF Backend
110 likes | 219 Views
Learn how to efficiently serve Flash and HTML front ends using ColdFusion with XML, ensuring easy porting and data handling. Discover solutions, tips, and resources for successful implementation.
Seamless Integration of Multiple Front Ends Using CF Backend
E N D
Presentation Transcript
Flash and ColdFusion Using Multiple Front Ends with a CF Backend. Sandra Clark Shayna Productions slclark@shayna.com www.shayna.com
The Challenge • How to use the same ColdFusion pages to serve multiple Front Ends (Flash, HTML) with no changes. • Why? • Flash has 96% penetration rate. • Same on all Browsers • Multiple Front ends using the same back end make it easier to port apps. • Section 508, HTML, WAP, FLASH
The Problems • How to get information into each front end without changing backend programming. • Each front end has to be able to handle the same type of data.
The Requirements • Each front end must be responsible for retrieving user input and processing it so that the ColdFusion server can use it in the same way. • Each front end must be responsible for retrieving data and processing it for display. • Back end must only be responsible for gathering information, running business tier, talking to database, and packaging up data for sending to front end.
The Solution • XML • Standard way of sharing data • Both CF and Flash can handle XML with Parsers • CF_XMLPARSER from CFDev.com • Flash 5.0 has xml object built in
Can it Work? ON TO THE CODE!
Gotchas • Debugging is a pain (Flash) • Could never get XML working in test mode, • Had to publish it to get XML working. • Flash kept caching the call to calc.cfm. Had to add a random number to the URL to make it work correctly. • Make sure debugging is off in CF Template, Flash cannot handle anything other than the XML coming back. • NO WHITE SPACE
Gotchas (2) • Debugging is a Pain (CF) • Can’t see errors in a browser. • Use CFAdmin Application Log to find errors. • Use <CFFile> to write outputs to text file. • No White Space – Use CFSilent • Use ReReplace to get rid of extra white space. • Coming from HTML <CFHTTP> • Get rid of “attribute = “ part before parsing XML
Links/References • Books • Foundation Flash (Friends of Ed) • Foundation Actionscript (Friends of Ed) • Flash XML Studio (Friends of Ed) • Actionscript The Definitive Guide (O’Reilly) • Inside XML (New Riders) • Lists • CFTalk (House of Fusion – houseoffusion.com) • Flash List (Figleaf - chattyfig.figleaf.com) • Sites • xml.org • Flashcfm.com • www.macromedia.com/software/coldfusion/resources/flash_coldfusion
Flash/Dynamic Sites • www.franklinplanner.com • www.ihotelier.com/onescreen/onescreen.cfm • CF_FlashBoard • http://www.mallofcharleston.com/flash/cf_flashboard/purchase.cfm • www.smallblueprinter.com • www.egomedia.com