September 2009

You are browsing the archive for September 2009.

CFGroovy2 and Ehcache

Until this point, CFGroovy2 has used a custom WeakHashmap/WeakReference caching mechanism for compiled scripts.  It works, and it ensures that the script cache won't run your JVM out of memory, but that's about it's only selling point.
Today I plugged in Ehcache as an optional caching backend if it's available on your classpath.  When CFGroovy2 spins [...]

Custom Scopes for CFGroovy2

The middle of last week I committed an update to CFGroovy2 to allow an arbitrary number of scopes to be passed in as attributes, just like you have always been able to do with the 'variables' attribute.  If you update, the change is the addition of lines 47-51:
<cfloop list="#lCase(structKeyList(attributes))#" index="scope">
<cfif listFind("language,lang,script,variables", scope) EQ [...]

Edit Distances Bug

This evening I found a bug in one of the optimizations that I made to the edit distance function.  I've corrected the code in the original post, and made a note of the change there as well.  Just wanted to mention it in a second post so anyone who read via RSS will be aware [...]

Edit Distances and Spiders

An edit or string distance is the "distance" between two strings in terms of editing operations.  For example, to get from "cat" to "dog" requires three operations (replace 'c' with 'd', replace 'a' with '0', and finally replace 't' with 'g'), thus the edit or string distance between "cat" and "dog" is three.  Aside from [...]

Groovy Objects in CFML (a la Ben)

Ben Nadel posted an interesting article over on his blog titled Instantiating Groovy Classes In The ColdFusion Context where he demoed how to create a class factory in Groovy and invoke it from CFML to insantiate new instances of Groovy classes without actually reentering a Groovy context.  I wanted to expound on what he demoed [...]

This Is Why Groovy Rules

So I have a collection of newsletters, and each newsletter has a collection of articles.  Each article, in turn, has a collection of authors and a collection of categories.  Now what I need to do is get a list of unique handles for all the authors and categories for a given newsletter.  Here's the CFML [...]

LessCss for CFML Developers

LessCss is a nifty extension to the core CSS language to support variables, calculated values, inclusion-by-reference, nesting, and some other goodies.  Basically the idea is to simplify and reduce duplication in large stylesheets.  Here's a simple example of a variable and a computed value:
@color: #fdd;
#header {
background-color: @color;
color: @color / 2;
}
That translates [...]

I'm on CFPanel This Evening

This evening (depending on where you live) is CFPanel, and Mark Mandel, Brian Kotek, and myself are talking about CF and Java integration.  It starts at 5pm PST (8pm EST) if you're interested in attending live, or will be available as a recording after the fact.

"Dear God, Please Send..."

"Dear God, Please Send…"

There is humor here……