ColdFusion-Talk Roundup #8

 
Jul 17, 2008

by Kay Smoljak

Noteworthy threads from the famous ColdFusion-Talk (CF-Talk) List on House of Fusion for the Week of May 18 - 23, 2008

Debugging in CFSCRIPT (May 20, 2008)

Thread: debugging in cfscript

Richard White was looking for a way to examine variables for debugging purposes in CFSCRIPT blocks, where the CFDUMP tag is not available. Charlie Griefer and Dominic Watson posted very similar solutions (almost at the same time!) – a custom CFFUNCTION that takes in a variable and returns the CFDUMP output. A good one for the snippet library!

Correct use of Application.cfc (May 20, 2008)

Thread: ColdFusion 8 0 1 Application.cfc issue

Larry Schaberg was experiencing a problem using Application.cfc – it appeared that the Application-scoped variables were not available in subdirectories of the site under the folder with the Application.cfc.

Jason Durham, Andrew Scott and Michael Dawson pointed out that the CFAPPLICATION tag syntax that Larry was using was not appropriate for use with the Application.cfc architecture. A few other troubleshooting ideas were also floated. Ian Skinner suggested checking for any other errant Application.cfm or Application.cfc files in other directories, Brad Wood suggested making sure the Application.cfc file was named with an uppercase initial A if the server was running a case-sensitive operating system, and William Seiter suggested inserting a test output string to check if the Application.cfc was being called at all.

Larry followed up to say that the problem was solved – he realized that the problem was due to an unusual web root directory structure. The thread is a good reference however, both for ensuring that Application.cfm and Application.cfc architectural conventions are not being mixed, and for methods to troubleshoot common problems with the Application structure.

Directory watcher event gateway duplicates (May 20, 2008)

Thread: ColdFusion 8 directory watcher event gateway

Tony Weeg set up a directory watcher event gateway, and was getting two notification emails for every file change instead of the one he was expecting. Andrew Scott suggested that the act of editing the file might actually be deleting and then recreating it, causing the two change events. However, in the end Tony worked out that the 10-millisecond timing interval was simply too short. Moving to a longer polling interval resolved the issue.

Online credit card storage (May 22, 2008)

Thread: credit card storage help

Jessica Kennedy was seeking advice on the encryption and storage of credit card details for recurring billing. A number of list subscribers immediately warned against taking this approach, outlining a number of reasons why the practice is a bad idea. Phillip Vector recommended Shift4 for a payment provider with recurring billing features. Haskins also linked to the very expensive but secure NChiper appliance for storing numbers.

Setting variables in onRequestStart() (May 22, 2008)

Thread: setting page variables in onRequestStart

Richard White wanted to know if it was possible to set Variables-scoped variables in the onRequestStart method of Application.cfc and use them in other places in the application. Raymond Camden confirmed that the Variables scope of Application.cfc was not available to other templates, and suggested using the Request scope instead. The offshoot of this thread was an interesting discussion on the value and usage of the Request scope.


Kay is an all-round web developer who has been developing with ColdFusion since 2000. She runs Clever Starfish with her partner Dave and several very demanding cats, and sits on the committee of the Australian Web Industry Association. She is a regular writer for Fusion Authority and the Fusion Authority Quarterly Update, and a ColdFusion blogger on Sitepoint.com.

Add a Comment
(If you subscribe, any new posts to this thread will be sent to your email address.)
  
Privacy | FAQ | Site Map | About | Guidelines | Contact | Advertising | What is ColdFusion?
House of Fusion | ColdFusion Jobs | Blog of Fusion | AHP Hosting