Hi Paul,
I'll answe this as the developer of a free servlet framework which
includes a template engine:
http://www.webmacro.org
Stefano (Java-Apache) tried to get us all talking about this at one point.
The problem is there are radically different approaches to how data
should be provided to a template.
JSP expects it to be a bean. WebMacro will introspect arbitrary
Java classes, preferring beans. Others require your classes to
implement specific interfaces in order to deposit them in the
template (not using introspection at all), or even expect you
to construct your data using their data structures.
A common API to the template engine itself is therefore unlikely.
What I think would be useful is if we could all agree on a common
mechanism for storing business logic. Maybe what is needeed is a
free implementation of Enterprise JavaBeans or something. Free since
I'm certainly not going to bind my free software to someone else's
proprietary application server.
However, even here there's trouble because some "template systems"
require a specific object model on the back end, which may not look
much like a bean. Then you'd have to extract data from the bean
and copy it into their API--but maybe that's the best way in
the end. At least then you can re-use business logic.
I feel it's one of WebMacro's strengths that it doesn't care what
kind of objects you feed it. It can get at any public property
or method.
Justin / [EMAIL PROTECTED]
http://www.webmacro.org
Quoting Paul Philion ([EMAIL PROTECTED]):
> Cezar (et al) -
>
> Cezar Totth wrote:
> > Because you mentioned about a FAQ to include your message.
> > the http://japs.genesys.ro might be interesting too.
>
> I'll add that to my list.
>
> > You know about a template-related mailing list? I've seen lots of wheels,
> > in many shapes and sizes (re)invented by many people..
> > Mabe some common effort will benefit all..
>
> Cezar raises an interesting question: We have got many template engines
> with many template formats and code would have to be rewritten to move
> from one to another. How about defining a standard interface(s) for
> interacting with a template engine.
>
> I don't want to suggest what that interface should look like, I think
> the people that are writing the template engines have a much better of
> what capabilities a template engine provides (I always have an opinion,
> though). Does anyone have any suggestions? Or am I just barking up the
> wrong tree?
>
> - Paul Philion
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html