Glen Ezkovich wrote:
I think we share the same sentiment. On the other hand, you can not be sure that someone has not turned this feature on unless you check and if the feature is there you can check to see if it has been used. Either way you have to check. Admittedly, checking wether it is turned on is easier then checking if it has been used. If you are in charge and you say "do not write Java programs in the template", then the compliance is not voluntary.
On the contrary, we have one group that creates the XSLTs and templates. They don't have access to the sitemaps or cocoon.xconf. So using a configuration switch is sufficient.
Until recently, I believed that "features" such as this should be configurable because as you say, not everyone shares the same view. What I've come to realize is that the more there is to configure the more difficult and annoying a product becomes to use. I've also come to realize that if I believe strongly about a policy and can build consensus, then its probably a good thing to enforce that policy in code. There is a reason that you will have your organization prohibit this feature. Why, in a product that you are contributing to will you allow users to make bad decisions? Stand up for your convictions. While CTemplate will be Cocoon's template framework, nothing precludes those who want the ability to write Java programs in their templates from implementing there own template generator or using the current JXTG.
Most Cocoon users don't want to write Java code, and if you have been following the user's list you'll see that many don't even know how to write Java. They expect us to give them what they need.
The feature of configuring the ability to write Java programs in a template smells of featuritis and MS Office syndrome. If you feel that there are currently valid reasons to allow Java programming in a template leave the ability in and add a script to your build system that checks for this in your templates. If you, like me, can see no valid and appropriate use case at this time, take it out. Keep things simple.
Build systems can't check templates that are brought in from a content management system at run-time.
Ralph
