Quoting Eduardo Pelegri-Llopart ([EMAIL PROTECTED]):
> I take objection to the "push misinformation like that". I am truly
> trying to understand the value of "template systems" like Webmacro.
> There is no attempt to "push".
Sorry. Sometimes I can be a little more fiery than I should be. I was
objecting to the claim that WM's functionality is just syntactic sugar
versus JSP. That sounds like you think WM and JSP are identical except
for some syntactic differences, whereas WM introspects and analyzes
classes much more aggressively than JSP (ie: beans) do.
> That said, and in the spirit to try to understand the value of template
> systems, I still do not see why
>
> <x:evalWebMacroExpr expr="whatever"/>
>
> does not cover what you say above.
So you propose this:
<a href="<x:evalWebmacroExpr expr="$href"/>>
over this:
<a href="$href">
The first version is not only incredibly ugly, it's not even legal in
an XML document. While you could fix that by switching to single ',
you quickly run out of kinds of quotes to switch to. But I suppose you
could describe this difference as just being syntactic sugar.
However, in order to make the first one work you have to have 90% of
WebMacro plugged in the back end anyway, in order to invoke the WM
introspection engine.
On top of that it's not clear where the "evalWEbMacroExpr" would
find its context from. JSP doens't have a strong concept of a context,
which is key in the design of WM applications. WM introspects against
a single top level "bean" called your context, which contains all of
the data and values for your view as sub-properties. The context also
provides a point of extensibility, since you can plug all sorts of
default beans into it that are shared between all WM servlets--giving
you a way to add on functionality globally.
This is a different way of viewing the world than JSP has, so I'm not
sure you could smooth it all over with syntactic sugar.
FreeMarker, etc., all have other ways of viewing the world as well,
views that change the way you think about and design your application.
The idea that you can forcibly cram these viewpoints into the JSP
worldview is naive. Systems like WM and FreeMarker not only implement
a set of functionality, they are built relative to an attitude towards
design that they intend to support.
While you might succeed in shoving the functionality into JSP, what
you would wind up with would be so clunky that it would cease to
offer support for the kind of designs the original was intended
to support.
- -
Here's another way to look at this: the only difference between C and
C++ is syntactic sugar. The original C++ compilers were just translaters,
which converted the C++ syntax into C.
Are you then claiming that C++ is an unimportant language, and everyone
should stick with C? After all, anything you can do in C++ you can also
do in C--the syntax is just a bit uglier.
The truth is that at some point these differences cease to be just
syntactic sugar, and they start to change the way you think.
If you want to think about objects, you need a language like C++ or
Java, because the syntax of those languages support your way of
viewing the program. You could write the same program in C, but
the syntax would be so alien that it would prevent you from
thinking clearly about your design.
> Finally, if there was interest, somebody could provide JSP using
> WebMacro as the scripting language.
This is the view I am railing against. WebMacro is not a scripting
language, it is a design framework. Within this design framework there
is an ultra simple scripting language--but the point of WM is the
design framework, not the scripting language.
Justin
___________________________________________________________________________
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