Joe Rinehart made a very good post about the state of "ORM" in CFML. Namely, that there isn't any. There are several abstract persistence frameworks for CFCs, but no real ORM solutions.
Like Joe, I've been using Hibernate/Groovy to back a lot of CFML applications of late and it's wonderful. Certainly not without some downsides, but having transitive state-based persistence is absolutely fantastic. And Goovy makes implementing your entities so much easier with implicit getters/setters, non-tag-based syntax, rich types (for building schemas automatically), and a whole pile of syntactic sugar.
The syntactic sugar sounds sweet! Any recommendation on where to get started, if my goal is to learn how to use Hibernate with CFGroovy one day? I have had enough of cfscript…
What should I learn first and where?
Thanks!
Henry,
Simplest would be to grab the demo app (http://www.barneyb.com/barneyblog/projects/cf-groovy/) and fire it up. The examples are contrived, but you'll get the idea. Then start poking away at the Hibernate documentation.
CFGroovy can't replace CFSCRIPT completely, as you can't access CF built-ins from Groovy. Similarly, once you invoke a Groovy method from CF, you can't call back up to CF from the Groovy class. I've not found that to be much of a problem, however.
Great, thx! I will check it out soon!