ColdFusion-Talk Roundup#5

 
May 11, 2008

by Kay Smoljak

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

CFMAIL settings (April 25, 2008)

Thread: cfmail won't send

Daniel Kessler wondered why his test CFMAIL message was not being delivered. Six Coldfusion-Talk subscribers gave troubleshooting suggestions, and the thread is a useful checklist for the causes of the most common CFMAIL problems. Daniel's problem went away when he removed the server attribute of the CFMAIL tag. This means that the default mail server setting in the CFAdministrator (which he did not have access to) was correct, and the mail server that he was specifying to override that setting was incorrect.

String vs. number comparison (April 28, 2008)

Thread: Compare digits as strings not integers

Ian Skinner wanted to compare two strings of digits as characters rather than numbers. Claude Schneegans, Sonny Savage and Axel Schultze suggested comparing both value and length, with the Compare(), CompareNoCase(), and Len() functions. Bobby Hartsfield and Dave Watts suggested adding a non-numeric value to the strings and then comparing them. Ian reported back that the Compare() function gave him the result he needed.

Automated Subversion commits (April 29, 2008)

Thread: Need some advice on speeding up query

Rick Faircloth wanted to speed up a large multi-table UNION query, and was looking for confirmation that adding indexes would help. Using Rick's supplied query, Rizal Firmansyah suggested the addition of keys on a number of fields, and using UNION ALL instead of UNION. Rick implemented the changes and reported that he was amazed at the effectiveness. James Holmes also offered some advice on the efficiency of the table structure.

The thread then evolved into a discussion of how best to implement paging for the records, given that the data structure was not optimal. Dominic Watson provided a solution that involved "injecting" a fixed value into each part of the union in place of a proper key, which Rick was able to implement. Mary Jo Sminkey then provided some alternatives for caching the query: using the cachedwithin attribute of the CFQUERY tag, storing it in an application variable, or making use of CFTHREAD.

Memory overhead of application-scoped variables (April 23, 2008)

Thread: Is this Application cfm abuse?

John Engstrom was surprised to find that when he dumped the application scope of a project he was working on, there were over 25,000 lines of variables and struct items. John wanted to know if that many variables in the application scope qualified as "application.cfm abuse".

A handful of listers weighed in on the topic, with responses ranging from "perhaps a little" to "not at all", but with most of the opinion that it would depend on the application and how it was structured.

Database structure diagrams (April 25, 2008)

Thread: Printing Database Structure

Steve Good was looking for a way to print tables names, column names and datatypes from SQL Server Management Studio. Marco Antonio supplied the SQL statement that Steve was looking for, but some other list members suggested SQL Server's built-in diagram tools, the DataMgr project on RIAForge, and CF8's built-in CFDBINFO tag.

Redirect/refresh methods (April 25, 2008)

Thread: problems with cflocation and redirect will never complete

Casey Dougall was having a problem with a script which was incrementally creating an XML file. After each row, the script would use cflocation to call itself again and find the next row to output. After a certain number of iterations, the browser was halting the request, as it thought it had hit an infinite loop.

Several potential solutions were raised – using Java redirects or increasing the script timeout – but these weren't taking into account that the problem was occurring in the browser, not on the server. Dominic Watson offered a solution using CFHTTP, and Dave Watts suggested either an asynchronous solution, or the use of meta refreshes in the browser.


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.

Sean Corfield's Gravatar I saw "Automated Subversion commits" and rushed excitedly to read this article... only to discover it was about cfquery :( Was there really an automated Subversion commits thread?
# Posted By Sean Corfield | 11-May-08 03:42 PM
Sean Corfield's Gravatar Also, comments don't work properly at least in Safari - I get lots of JS error alerts from CF. Please test your site in Safari (it's available for Windows!).
# Posted By Sean Corfield | 11-May-08 03:43 PM
Seth Bienek's Gravatar Ditto for what Sean said - I'd love to see the thread on automatic commits to subversion!
# Posted By Seth Bienek | 12-May-08 12:35 PM
Seth Bienek's Gravatar Here's the Subversion thread for those interested:
http://www.houseoffusion.com/groups/cf-talk/thread...

I was hoping to see something more along the lines of having Subversion commits automatically deployed to a dev environment via FTP, Samba, or even WebDav.
# Posted By Seth Bienek | 12-May-08 12:40 PM
Adam Tuttle's Gravatar @Seth -- I've accomplished automated deployments to a dev server by doing a check-out from the server, then setting a windows scheduled task that used the CLI Subversion client to do an extract with overwrite every night at midnight.
# Posted By Adam Tuttle | 13-May-08 09:25 AM
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