After some time from my initial announcement, I've started again working on my Clojure addon for Spring Surf. While it's still a rudimentary piece of glue code, it's now getting better and better, so much that I decided it's good enough now to release an alpha version on clojars. Here's what this library currently provides:
- a ScriptProcessor that allows webscript controllers to be written in Clojure
- a WebScript protocol and some utility functions to ease development of your own web scripts
- enough spring configuration to enable this addon just by importing the provided contextes
The approach is indeed easy and hopefully straightforward: the idea is to have your WebScript clojure controllers return an instance of a concrete implementation of the WebScript protocol, which will implement the run method the way you like.
Here's the sample code from a gist you might want to have a look at to better understand how to use this library:
You can also find other samples in the project tests.
The next episode will be about lambdalf, an Alfresco AMP I've been initially developing to prove the Clojure surf addon works fine, but that is now growing to be a full blown project by itself: a Clojure API for Alfresco!
Stay tuned. UVBRKNJTRFH7blog comments powered by Disqus