Quoting Taylor Gautier ([EMAIL PROTECTED]):
> > Quoting Taylor Gautier ([EMAIL PROTECTED]):
> > WebMacro is similar in that it relies on beans to supply the back end
> data.
>
> ok...? I don't think we were talking about WebMacro, but if you want to,
> sure...
The thread started out being about WebMacro and JSP. I guess the message
you responded to was talking about a different template system, and I
didn't notice the change. Sorry for the confusion.
> > > It is possible to put in or leave out Java code in the template.
> >
> > However, it is not possible to force that architecturally. This is similar
> > to saying that it is possible to write object oriented programs in C.
>
> I don't think I asserted that...
You said it was possible to put in or leave out Java code in the
template (JSP in this case). I claim this is a bad thing, since it
encourages you to put logic in your template.
> > You should check. WebMacro can loop over a result set, as can most of
> > the other template systems I've seen.
>
> You're probably right [most systems support a loop]. In the most generic
> sense
> though, the loop will be limited in some way. Sooner or later you'll want
> to do
> something that just isn't possible with your templating languages loop
> construct
Then it's likely you haven't properly prepared your data on the back
end. The usual solution is to construct some kind of Iterator in the
back and have it loop through just the values you want--possibly
manipulating them in some way as it goes.
I would claim that the point at which your template script loop isn't
powerful enough is exactly the point where you are starting to put
business logic (or at least session logic) into your template.
Note that under WebMacro you do have full access to 100% pure Java.
It's in your ordinary looking Java servlet that just so happens to
return its HTML by loading and executing a template. Prior to
executing the template, it can do whatever it wants.
Why limit yourself? Java's a great language for implementing session
logic.
> > WebMacro was recently selected as one of the best three servlet products
> > of 1999, by the Java Report, in the current issue.
>
> Do you work for them?
I am the principal creator of WebMacro, so I'm clearly biased. I don't
"work for them" because WebMacro is a free software product, available
to everyone under the terms of the GNU General Public License (if you're
not familiar with it, the same license that covers GCC, Linux, etc.)
For the record most of what I say also applies to the contrast between
FreeMarker (another good template system) and JSP. FreeMarker should
win vs. JSP for the same reasons that WebMacro does (in my opinion).
I wrote WebMacro because I hold these opinions.
Justin
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html