groovy

CFGroovy is Self Executing

Tonight I finished porting the internals of CFGroovy from CFML to Groovy.  Yes, the CFGroovy core is now implemented in Groovy.  The remaining CFML code is for managing the public API (which is a CFML API and therefore must remain CFML),and for bootstrapping the Groovy core.
This architecture provides a number of benefits, primarily a huge [...]

Why You Should Care About Groovy

If you know anything about me, you probably know that I'm a big fan of Groovy.  But why?  I've never really addressed that question head on, I don't think, so I'm going to do that here (prompted by a comment from David McGuigan on my CFGroovy 1.0 post).
First, Groovy is a dynamic language for the [...]

New CFGoovy Demo App

This afternoon I threw together a little blog demo app for CFGroovy.  It's really simple, but it illustrates some more advanced usage.  In particular:

The app uses ColdSpring to wire everything together and obtain transaction management with AOP, instead of having to code your transactions manually.
Entity relationships (as well as composition) with both direct and transient [...]

Running CFGroovy on in a Hibernate-Aware Environment

In my last post I mentioned the issue with using CFGroovy's Hibernate when Hibernate is already loaded by the app server, such as the case with JBoss 4.2+ and a certain unreleased CFML runtime (cough … Centaur … cough).  The gist of it is that Hibernate appears to create some static references to itself that [...]

CFGroovy 1.x Features

It was a big weekend for CFGroovy.  In addition to the 1.0 release, I started doing some work for the 1.x series (which is available in the trunk).  There are several significant changes to  the engine:

Groovy has been upgraded to 1.6.0 from the previous 1.5.6 version.
You can specify a custom Groovy JAR for your CFGroovy.cfc [...]

CFGroovy 1.0!

After a lengthy burn in period, I've officially released CFGroovy 1.0.  It is identical to CFGroovy 1.0RC3, so if you're running that version there is no need to upgrade.  You can get the 1.0 engine binaries, 1.0 demo binaries (including the engine), view the 1.0 tag in Subversion (engine or demo), or visit the project [...]

Project Euler Test Harness

Project Euler is a collection of mathematics/computer science problems, as you probably already know.  I've solved almost 50 of them so far, and I've developd a collection of utilities to make my job easier.  Some of them (factorization routines, prime generators, etc.) I'm not going to share as they are fundamental to solving certain problems.  [...]

A Groovy Letdown

I'm a huge fan of Groovy, but it's major downside drove over me like a bus this evening.  What's that, you say?  Performance, of course.  Runtime "stuff" necessarily happens at runtime, and therefore affects performance.  Does this matter in most cases?  No, absolutely not.  In general it's far cheaper to buy hardware than to employ [...]

Prime Factorization

In my ongoing rampage through the Project Euler problems I've needed a prime factorization routine several times, and figured I'd share it as a complement to the sieve I shared last week.  Implemented in Groovy, of course.  Typing is a little strange on first glimpse because Groovy uses Integer by default which only supports values [...]

CFGroovy 1.1 Goodness?

For CFGroovy 1.1, I want to do this sort of thing, where GroovyFactoryBean will instantiate the specified Groovy object and return it, suitable for injecting into an arbitrary CFC of choice:
<bean id="groovyFactory" class="cfgroovy.GroovyFactoryBean">
<constructor-arg name="cfgroovy"><ref bean="cfgroovy" /></constructor-arg>
</bean>
<bean class="cfcs.service">
<constructor-arg name="dao">
<bean factory-bean="groovyFactory" factory-method="getObject">
<constructor-arg name="clazz"><value>com.barneyb.Dao</value></constructor-arg>
[...]