on 1/11/01 8:30 PM, "Geoff Soutter" <[EMAIL PROTECTED]> wrote:
> Yeah, but thats an impl detail. You could easily modify it to load the HTML
> on the fly, so that the HTML could be modified separately. The main thing I
> like here is that you actually start with a "proper" HTML file, without a
> proliferation of proprietary "Cold Fusion" style tags. That way HTML codes
> can actually code real HTML, rather than some weird proprietary HTML
> sublanguage. Allaires "content management" thingo Spectra defines 400 +
> tags - how is your average HTML coder gonna deal with that? Course, it has
> other problems but hey, that was my original thesis ... unfortunately the
> real world is a complex place :-).
Ok, so what I hear you saying is that you are comparing XMLC against
something we all already know is not a good way of doing things? :-)
> Weren't you implying that under complex (read real world) scenarios, the
> tradtional Webmacro "push" style way of doing things breaks down? Thats all
> I was saying. Note your pull model Webmacro starts to sound like JSP to
> me... interpreted HTML...
Quite the opposite. Let me correct you and state that I don't use/recommend
WM, I use/recommend Velocity these days as Velocity is a much better
re-implementation of the original WM *concepts*.
Let me also state that at this point in time, I see Velocity+Turbine as
being one of the best solutions out there.
WM/Velocity is *parsed* HTML, however, that is where the similarities to JSP
stop. For example, people who code JSP tend to do things like this (taken
from a recent CVS check-in by a guy from IBM to the Jetspeed project):
<%
keys = rundata.getParameters().keys();
while ( keys.hasMoreElements() )
{
key = (String) keys.nextElement();
value = rundata.getParameters().getString(key);
out.println("<tr><td><b>"+key+"</b></td><td> = " + value +
"</td></tr>");
}
%>
The issue with that is that you are no embedding HTML code into your Java
code. How many designers without any programming skills (but have HTML
skills) do you know can edit something like that? What if the person wanted
to embed a bgcolor= attributed into the <td> tag? Then they would suddenly
also have to learn how to escape double quotes as well. Not very
maintainable IMHO.
With WM/Velocity, you would write the above something like this:
#foreach ( $key in $data.Parameters.Keys )
<tr>
<td><b>$key</b></td>
<td> = $data.Parameters.getString($key)</td>
</tr>
#end
Velocity has a well defined simple *template* syntax that prevents you from
making the mistakes that JSP doesn't prevent you from. In other words, yes,
you could have done the above JSP snippet correctly, however, my issue with
JSP is that it almost encourages you to do it incorrectly.
Also, the other advantage of the above Velocity example is that if you load
it into a browser without running it through the parser (ie: just load the
static template), it shows up ugly, but you can easily see the logic of what
you are trying to accomplish. If you loaded the JSP example the same
way...all you would see is...nothing.
In conclusion, let me restate that I feel that Turbine+Velocity is the right
way to implement Pull functionality for a simple to complex web application.
thanks,
-jon
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]