Glen Ezkovich wrote:
On Dec 8, 2004, at 11:10 AM, Stefano Mazzocchi wrote:


I think we should call our CTemplates taglibs "lenses" instead.
I like it.


Call them what you will. It doesn't change the core issue. If "lenses" allow you access databases, send emails, invoke business methods, etc. you still are inviting JSP/XSP like abuse, albeit, syntacticly not as ugly. It is not what you want to use them for, but what they can be used for and how they are introduced into the system that lead to potential problems.
Even right now you can call arbitrary Java code in JXTG by simple
<jx:set var="ignore" value="${Packages.org.apache.cocoon.Foo.bar()"/>. You would have to disallow to reference ANY method. In that case the template language would be very restrictive which I am not that great fan of.


That said, "lenses" as a name would at least not encourage anyone to abuse the system. In that sense, it is superior to "taglib". Unfortunately, they would be semantically the same.

So here you have my non-voting +1
+1. Good name which does not raise wrong emotions.

And another bit about the issue of needing user defined java backed taglibs/lenses:
Lenses and views are exactly what I want in order to provide reusability and the building of pages from components. These seem to be micro and mini templates. What is it that you cannot do with a library of jx:macros that causes you to need a full fledged Java object?
If talking about proper "tag" implemenetation (one that does only allowed actions) probably you could switch to macros. JXTG lacks only one feature that would make macro system complete: the ability to invoke a macro which name is resolved by expression. I will create another post about that.

Still there is one other this that jx:macro is not that suitable for: convertors. See previous threads for the problem description.

--
Leszek Gawron                                      [EMAIL PROTECTED]
Project Manager                                    MobileBox sp. z o.o.
+48 (61) 855 06 67                              http://www.mobilebox.pl
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

Reply via email to