As I said, I need to overhaul the examples and documentation to
reflect the changes made to cfmljure over many months of production
use.
> Or if the problems with ACF have enough of an impact
> to warrant it, state out front that Railo is the only CFML engine supported
> by cfmljure (and why)?
cfmljure itself will work just fine with ACF but the interop between
CFML and Clojure won't be as smooth as it is in Railo. To be honest,
until you raised the issue, I hadn't even realized that ACF's [1,2,3]
won't pass seamlessly to Clojure as a numeric sequence... I don't use
ACF any more and only keep an instance around for compatibility
testing - which I will work on when I get around to overhauling the
examples!
My primary setup for running CFML and Clojure together is Tomcat so I
might create a WAR install of ACF to run on my Tomcat instance and
test cfmljure there - given that Adobe are (finally!) scrapping JRun
and adopting Tomcat. I do want to get cfmljure wired up with Jetty
too, so that I can create a simple, standalone bundle that folks can
just download and work on out of the box (it would be Jetty + Railo,
of course)...
Yeah, the amount of JEE infrastructure / classpath knowledge that most
CFers _don't_ have gets in the way of cross-language stuff like
this...
> But I'm
> looking forward to trying out the next iteration and thinking how I might
> integrate it in my work, particularly in conjunction with a no-sql datastore
> solution.
CongoMongo - the Clojure wrapper for MongoDB - is pretty sweet but
it's designed to be used from Clojure, which is why at World Singles
we wrote a thin CRUD layer that sits around clojure.java.jdbc (for
stuff like MySQL) and CongoMongo (for MongoDB) and now we can just do:
variables.clj.worldsingles.data.save_row("sometable",{name =
"Nando",location = "Switzerland"});
and it "does the right thing" (saving it to wherever "sometable" is
configured to go - MySQL or MongoDB). We can retrieve it in a
storage-neutral way by doing:
var cfguys = variables.clj.worldsingles.data.find_by_keys("sometable",{name
= "Nando"});
writeOutput("Found #arrayLen(cfguys)# CF guys called Nando");
writeDump(cfguys[1]);
Only if we need to deal with primary keys directly do we need to care
about storage (we return a sequence of generated keys from MySQL but
we return the whole updated document from MongoDB, due to the way they
work under the hood...).