To broaden the discussion out a bit,
we've tried all these methods!

I didn't like putting the HTML in
java because it is inflexible, and
only suitable for projects where
the interface is pre-defined and
expensive to change (i.e. embedded
servers or highly documented/tested systems).

We used selfmodifing dhtml on one
project ( static html+javascript with
a header, inserted at ouputtime,
 which sets various javascript variables. This works ok, but is a
pain to code, and very sensitive to
browser versions.

We've used Jsp and webmacro, and
they both have their strong points,
but they both impose a certain
design and process on a project,
of the 2 I prefer WM since the
process puts the java architect in
control, as opposed to Jsp where
the html'ers can stick any damn
java they like into the page and
blow away my business logic!

We currently have 3 projects running (one nearly complete)
where the servelets output XML
which is then transformed by the
XSL written by the html people.
(in practice we code up functional
but ugly pages, and they laugh and
then make them look like something!).
The projects differ in the way the
XML gets generated:
        In one case it is emmitted by
oracle's Xsqlservlet, we code the
appropriate sql and out comes XML!
(if your database  needs a thick
logic layer this works less well).
        In annother case we have a
pile of beans which represent the
data we want to display. Here we
use some hand written java  in the servlet that
walks the beans writing XML.
        In the third case we have some
legacy data available as XML, our
servlet just writes the appropriate
subtree.

We've found that it gives a nice
clean separation of form and function.
Once the browser population catches
up with XSL 1.0 it has the potential
to lighten the load on servers since
the XSL can be served separately
by plain web servers and caches.
What's more the string manipulation
work is done in the browser, saving
many server-side cpu cycles.

Untill that happens you can do the
transform on the server and output
plain html.

The only place we find more problematic is in the area of
secure submission of data,
which seems hard to do in this
model, but we are working on it.

If you are struggling to get your
head around XSL, it took me a few
days,- it is to XML what awk is to
ascii!

Tim.

---
URL http://www.westhawk.co.uk/

___________________________________________________________________________
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

Reply via email to