You can achieve the same effect with a facade class. The facade to presents a
simple interface for the JSP and it's just one bean. The underlying data beans
can change without affecting the HTML writer. You have total control. So JSP
really doesn't have a disadvantage here.
WebMacro, as I understand it, doesn't really shield you from class changes. If
you change a property from data.getFoo() to data.getBar(), the WebMacro templates
still need to change $data.foo to $data.bar. Of course, you could create a
facade for WebMacro, too.
... of course, what you _really_ should do is create semantically meaningful tags
like <shopping-cart-summary/> using XSL. :-)
Scott Ferguson
Caucho Technology
Justin Wells wrote:
> If this is your concern, use servlets along with a template engine like
> WebMacro. In a servlet/template system, the programmer has total control
> over what information appears in the template, and under what name. The
> type of the object can change without affecting the result.
>
> The template is still easy for a non-programmer to modify.
>
> http://webmacro.org
>
> WebMacro is free software.
>
> Justin
>
> Quoting Andrei Filimonov ([EMAIL PROTECTED]):
> > I think that the only clear advantage of using JSPs is the possibility for
> > HTML writer with very little knowledge in Java or any other programming
> > stuff to create data-driven Web pages.
> >
> > On the other hand there is a huge disadvantage - one has to expose as many
> > data beans as that writer is supposed to be aware of. That means a lot of
> > them. In result JSP application gets extremely vulnerable to any
> > modifications. Should the specification the data bean change it will require
> > rewriting all JSPs using that bean.
> >
> > Using servlet based model it is possible to handle the requests only by
> > single servlet dispatching those requests to the currently active form. In
> > other words all data beans are hidden behind that servlet.
> >
> > Andrei Filimonov
> >
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".