groovy

Closures for Java

Wanting some light reading for this evening, I decided to dig into the Closures for Java draft spec (homepage).
Oh. My. God.
I'm a huge fan of closures. They're elegant, simple, and easy to use. Their semantics are subtle, but not confusing. They allow for very concise implementation of otherwise complicated algorithms, [...]

CFML and Groovy

So As I said in my last post, there's been a lot of talk about integrating CFML apps with other bits.  I've been playing with Groovy and Grails a fair amount (duh), as well has having a lot of conversations about it.  I've been trying to figure out what the best use case is for [...]

CFUNITED Day One

As is typically the case, CFUNITED has a pair of themes.  There's the conference theme, which, as always, is helping CF coders become more empowered by learning about new things (OO, using CFCs, learning frameworks, etc.), and then there's the "backtheme".  This year it's all don't use only CF.  Adobe's integrating Hibernate into CF9, Railo [...]

Scriptlets in CF Anyone?

My last post about Comparators via CF Groovy was simplistic in nature, but the underlying concept is incredibly powerful.  Here's a similar snippet (from the demo app), this time using a Comparator class:
<g:script>
Collections.sort(variables.a, new ReverseDateKeyComparator())
</g:script>
So what do we have here?  Why it's a snippet of Java embedded directly in your CFML page, and it gets [...]

Comparators in CF with Groovy

I don't know about anyone else, but wanting to create little ad hoc Java classes in my CF apps in a common occurrence for me.  With my CF Groovy project, it's both possible and very easy.  No Java, no compiling, no classloading hacks.
Here's a simple example.  I'm going to create an array of structs and [...]

CF Groovy

Those of you who remember CF Rhino will recognize the name for my latest little project. I whipped up a small proof-of-concept integration for Groovy into CF apps tonight while playing with some classloading issues within Groovy itself.
Groovy has a number of advantages for this type of integration of JavaScript, the biggest one being [...]