ColdFusion-Talk Roundup#4

 
May 01, 2008

by Kay Smoljak

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

Search-engine-friendly URL rewriting (April 18, 2008)

Thread: URL re-write SEO friendly

Bryan Stevenson passed along a query on how to rewrite URLs in a search-engine friendly format as requested by an external SEO specialist company. After clarifying that he needed a solution for IIS, Dominic Watson and Mark Kruger were both able to recommend products, one commercial and one free. [Editor's Note: Fusion Authority Quarterly Update Vol. 2 Issue 1 and Vol. 2 Issue 3 both have articles covering techniques for search-engine-safe URLs.]

Screen scraping in ColdFusion (April 21, 2008)

Thread: Reading data from a website

Rob Parkhill asked for advice on getting daily temperature data from an external web site. Dominic Watson gave an overview of solutions that depended on several scenarios, and Rob confirmed that it was a third party web site and he would need to "screen scrape" – take end-user display data and attempt to parse it into a format that he could store in a database. Several options for parsing input text with regular expressions were then given, as well as a helpful link on finding a publicly available web service to provide the data.

Database table indexes (April 22, 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.


Christopher Rockett's Gravatar Kay, I LOVE your recap of the the cf-talk list topics. I just don't have time to read the entire list anymore and your summary allows me to pick and choose topics of interest. Thank you and keep up the good work.
# Posted By Christopher Rockett | 20-May-08 10:10 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