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 querying.  The two means of comment ordering is of particular interest.
  • More complex program flow using a mix of CFML and Groovy.
  • FB3Lite for the front controller with a bit of neat view-layer stuff

The app is still definitely demo-ware, not anything even close to production worthy, but it's a lot closer to the real world than the existing demos.

Building the app also illustrated a minor issue with the core CFGroovy runtime: the 'params' binding could be altered within Groovy code, but the changes don't reflect back in the CFML context, because it's a synthesized structure.  Because of this, I changed it to be immutable (using Collections.unmodifiableMap) so you'll get a fast failure if you attempt to modify it from within Groovy.  This is theoretically a backwards-incompatible change if you used the 'params' binding to pass data between multiple Groovy scripts in the same request.  However, I'm going to ignore that potential use case.  : )

Comments are closed.