On Fri, Dec 23, 2011 at 5:39 AM, Shantanu Kumar <kumar.shant...@gmail.com>wrote:
> Hello,
> I have few questions about suitability of Sitemesh 3 for JVM
> languages:
> 1. Is SiteMesh 3 strongly tied to Java? How easy it might be for users
> of JVM languages (eg. Clojure, Groovy etc.) to use Sitemesh 3? For
> example, a requirement to pass a classname for Sitemesh to instantiate
> may be unhelpful for Clojure as that needs Ahead-Of-Time compilation.
It's fairly common for other JVM languages to be used with SiteMesh. The
actual decorators themselves have no code in them - it's only custom
configuration that is done through Java. But the API will work equally well
in other languages. In fact, Clojure is particularly well suited for
building DSLs that express SM configurations.
> 2. Is Sitemesh 3 strongly tied to the Servlet technology? (The JVM
> languages may not depend on Servlets for the web stuff.)
The core of SM3 is web-technology agnostic. Out of the box it comes with
bindings for the Servlet API and offline building tools. You can plug it
into another framework if you want.
For example, I have SiteMesh bindings for Webbit, which is another JVM web
server that does not use the Servlet API.
https://github.com/joewalnes/webbit-sitemesh
Any particular framework you are looking at?
> 3. Can page organization be expressed in a form other than XML?
You do not need to use any XML to use SiteMesh. The XML configuration
reader is there for convenience, but you can also build the object model
yourself.
See http://www.sitemesh.org/configuration.html for comparison of XML vs
programatic configuration.
If you need more control, you can always implement your own selection
interfaces.
https://github.com/sitemesh/sitemesh3/blob/master/sitemesh/src/main/j...
Hope that helps.
-Joe
> Regards,
> Shantanu