Using Java objects to loop through a directory and check date last modified on files.

{ Posted By : Eric Cobb on February 25, 2010 }
273 Views
Related Categories: Java, CFML

This is probably a no-brainer for some of you, but I was playing around with CFML's underlying Java capabilities the other day and thought I would share this little gem. Not that it's all that extraordinary, or even really useful, I've just got some free time and I haven't blogged anything in a couple of weeks so I figured "why not?".

More »

Discrepancies in the way ColdFusion validates dates.

{ Posted By : Eric Cobb on February 8, 2010 }
355 Views
Related Categories: CFML, ColdFusion

There seems to be discrepancies in the various date validations used throughout ColdFusion, or at least I've found one case where it inconsistently considers a value a valid date. It's probably easier to demo what I'm talking about than to try to explain it. Here's an example:

More »

Problem with cfqueryparam and Oracle's char datatype.

{ Posted By : Eric Cobb on January 8, 2010 }
748 Views
Related Categories: Databases, CFML

I ran into a problem this afternoon with cfqueryparam when querying an Oracle database that really had me scratching my head. In my query's WHERE clause I was filtering against a column that had a CHAR(8) datatype, but whenever I ran the query with cfqueryparam it wouldn't return any results.

More »

CFML 101 - Rookie Mistakes Part 2

{ Posted By : Eric Cobb on December 17, 2009 }
638 Views
Related Categories: CFML, CFML 101

Just as in Rookie Mistakes Part 1, this post will cover mistakes that we've all made at one point or another. These are things that seasoned developers instinctively know to do, but beginners may not realize are better or more efficient. Some of this post is based loosely on Adobe's Coding Best Practices for ColdFusion Performance, with a few of my own personal favorites thrown in there.

More »

A valid use for the Evaluate() Function?

{ Posted By : Eric Cobb on December 10, 2009 }
621 Views
Related Categories: CFML

In the comments to my recent Rookie Mistakes post, Paul mentions that he is using Evaluate() to get the value of variables stored in a database. In this particular case, he's not storing the variable values in the DB, he's storing the actual variable names and then using Evaluate() to get their values via CF. To be specific he's storing a formula in the DB, and then using Evaluate() to perform the calculation and get the values.

More »

CFML 101 - Rookie Mistakes Part 1

{ Posted By : Eric Cobb on December 6, 2009 }
961 Views
Related Categories: CFML, CFML 101

This is the first in what I hope to be a continuing series of CFML 101 articles. My intent is to produce a blog series aimed at the beginning CFML developer, one which helps to explain basic techniques and concepts to those new to the CF world. The topics and examples covered in this series focus on the CFML programming language in general, not a specific application server. So whether you're using ColdFusion, Railo, or Blue Dragon (referred to as CF/R/BD from this point forward) to run your CFML applications, these concepts still apply.

More »

Using a Session Facade in ColdFusion

{ Posted By : Eric Cobb on December 3, 2009 }
705 Views
Related Categories: CFML

Over the weekend I updated my Using a Session Facade entry on the Mach-II wiki, and decided to abstract part of it and repost here as a "non Mach-II" tutorial on Session Facades. Now by no means do I consider myself an authority on Session Facades (or anything else for that matter). I realize that there are varying opinions on the subject of Session Facades, as well other (possibly better) ways to accomplish the same thing. My hopes are that I've written this blog post in a way that it can explain the basic concept of a Session Facade to someone who's never used it, and possibly help to trigger one of those "Ah-ha!" moments that we programmers do so enjoy.

More »

How does caching a query inside of a CFC work?

{ Posted By : Eric Cobb on September 25, 2009 }
846 Views
Related Categories: General, CFML, Ramblings

I have some confusion on caching a query from inside a component, so this post is really just a call-out to the CFML community to help me figure it out. In a nutshell, here's my question: Can you cache a query if it's in the "var" scope of a CFC? Before you answer, let me elaborate a little to explain my thoughts on the subject.

More »

Using a Session Facade in Mach-II

{ Posted By : Eric Cobb on August 24, 2009 }
715 Views
Related Categories: CFML, Mach-II

Last week I added an entry to the Mach-II wiki on using a Session Facade. This was my first time writing anything for the wiki, and I have to say that I really enjoyed working on it. Do you ever have those "Ah-ha!" moments when you're trying to figure something out and suddenly everything just clicks? Well, that happened to me 3 or 4 times while putting that wiki entry together.

More »

cfheader, 404 status codes, and why you shouldn't use them.

{ Posted By : Eric Cobb on August 11, 2009 }
989 Views
Related Categories: CFML

In a previous post, I wrote about using cfheader to specify different HTTP status codes and how you can use them to guide the Search Engines. I briefly touched on using a 410 "Gone" status code versus a 404 "Not Found", and wanted to expand on that a little bit here.

A lot of times people mistakenly use a 404 status code when they should be using a 410. In fact, there are very few (if any) cases where you would want to programmatically return a 404 error.

More »

More Entries »