Archive for the 'Coldfusion Development' Category
4.11.08 MSSQL - Fast Character Field Loose-Comparison category: Coldfusion Development, MSSQL
0
comm

Another absolute gem that a coworker of mine, Scott Fitzpatrick, found as part of our continuing database optimization was how to compare character fields fast if doing a “loose” comparison. Say we wanted to find a row where the field was O’BRIEN but we wanted to match on OBRIEN. We have previously been using a [...]

3.17.08 Fast Display of Coldfusion Execution Time category: Coldfusion Development
2
comm

There is a definite penalty to using the “Report Execution Times” in the coldfusion administrator. There is a simple way to use built-in java timestamps to guage execution time.
I simply add a start time at the beginning of a request via the Application.cfc’s onRequest method and calculate the difference in time at the end of [...]

2.13.08 Consolidate & Compress AJAX Javascript Files Through Coldfusion With JSMin category: AJAX, Coldfusion Development, DHTML
0
comm

When building a large-scale AJAX application the size and number of supporting Javascript files grows quickly. There are many projects out there to aid in the optimized delivery of so many AJAX application assets which essentially consolidate several Javascript files into one file, “compress” via JSMin and finally compress via mod_deflate or simple gzip HTTP [...]

12.17.07 Custom Coldfusion Caching Engine category: Coldfusion Development
2
comm

CFCACHE is a black box item. It works well for “normal” pages, but it’s one caveat since version 6 of Coldfusion was that it automatically pre-pended the cache file with a <!— URI —> right at the top of the file. This ruins any DOCTYPE declaration in IE and there’s no way around it - [...]

6.19.07 Get Client Request Headers in Coldfusion category: Coldfusion Development
0
comm

Have you needed to acquire the exact values of a specific request header from the client? Do the default CGI variables in Coldfusion not offer access to a specific request header that you need?
If so, the fabled getPageContext() method offers easy access to the string values of these request headers.
<cfoutput>#getPageContext().getRequest().getHeader(”Host”)#</cfoutput>
<cfoutput>#getPageContext().getRequest().getHeader(”Cookie”)#</cfoutput>
<cfoutput>#getPageContext().getRequest().getHeader(”User-Agent”)#</cfoutput>
<cfoutput>#getPageContext().getRequest().getHeader(”Referer”)#</cfoutput>

5.21.07 Capture All Coldfusion Errors in CFAJAX category: Coldfusion Development
0
comm

Ever been stuck with a CFAJAX-driven application that throws a CFERROR that causes the AJAX application to “break” when it comes to the user-experience…?
One problem with the development cycle and regression testing of CFAJAX-based applications is the inability to easily “capture” errors as they happen in the Coldfusion code that makes up the actual AJAX [...]

3.21.07 Send Native JSON Javascript Objects Back to CFAJAX category: Coldfusion Development, DHTML
0
comm

Every CFAJAX example I’ve seen thus far has only shown the transmission of simple datatypes from Javascript to a CFAJAX handler Coldfusion file. I wanted to go a step further and bring a completely native Javascript JSON object into Coldfusion.
Make sure you have the newest implementations of the following:

json.js version ‘2007-01-10′ or later from http://www.json.org/js.html [...]

3.7.07 Unix Timestamp in Coldfusion category: Coldfusion Development
0
comm

This is simple to do - and horrifically useful when using Coldfusion in line with Unix servers and other Unix-based scripting languages…
<cfset jDate = createObject("java", "java.util.Date")>
<cfdump var="#jDate.getTime()#">
Download this code: cfmx-unix-timestamp
This should be self-explanitory - and useful. The Java core saves Coldfusion in the end AGAIN.

3.2.07 Store Binary Data In MySQL With Coldfusion category: Coldfusion Development
1
comm

We found the need to have dynamic PDFs generated, displayed to the user, then a copy stored version of the PDF in binary format in a MySQL database.
This is great for PDF-based invoices, confirmation letters, etc that need to be generated and stored. In our case - writing the PDF to a web-accessible directory made [...]

2.19.07 CFAJAX + JSON == Better Javascript Object Support category: Coldfusion Development
0
comm

I’ve been developing around CFAJAX automatically instantiating any coldfusion struct in Javascript as an array of KEY:VALUE pairs. I fell victim to several traps in CFAJAX when there were ever a KEY:VALUE pair with the VALUE being an empty string.
The more I dug around the cfajax code the more I figured it would be best [...]

Older Posts
2.774s