Groovy + ColdFusion = Happy
Over the past month or so, I've become less and less enchanted with using ColdFusion Components to model my applications. They're verbose, and they don't support many constructs I've gotten used to in Actionscript 3.
I've started looking at Groovy, a dynamic language that compiles to the JVM, as an alternative. In theory, results in true Java classes that ColdFusion can use like any other Java class, but is also a truly dynamic language.
I was pleased to find that it simply works: creating a Java project in Eclipse, adding a Groovy class to it, and exporting a .jar into WEB-INF/lib makes the compiled Java version of the Groovy class available upon restarting ColdFusion, just like writing Java. Woot!
Here's the thing, though: you still have this code -> compile -> restart ColdFusion bit to deal with.
I've almost fixed that - I've got a GroovyLoader CFC here that wraps GroovyClassLoader, allowing dynamic compilation of Groovy classes into a running instance of ColdFusion. I'm going to clean it up and test it some on my flight (boarding now!), and hopefully post it later this week...


So what exactly is accomplished by this? Essentially a nicer way of writing CFCs? Why keep using the ColdFusion at all? Works as a better glue on the front end?
What are your thoughts on this versus the possible availability of a full CFScript or AS support in CF9?
I'm looking forward to taking a look at it! (I've never used Groovy before, but have heard some good things about it.)
@Dan - Haven't explored other languages, but whatever I release will be open enough to try to adapt. It's not terribly complicated...basically wraps GroovyClassLoader to build URLs to load into its classpath, then compiles any .groovy files found in those directories.
@Asif - GORM is giving me fits. I've bootstrapped a DefaultGrailsApplication instance, based on the code on the standalone GORM site, but while I get the version and Id properties added to the class the dynamic persistence methods aren't working yet. If I get that working, you can bet I'll blog it :).
-----
Outside of Grails, there are folks who have hooked up Groovy classes to Hibernate via JPA annotations, which is another thing I'll be exploring. Not something that I think everyone in the CF community would adopt, as it requires moving off of JRun and treating CF as a foundation for a JEE application rather than a server on which to develop multiple applications