>>> "Steven J. Owens" <[EMAIL PROTECTED]> 8/9/99 10:44:46 PM >>>
>     I have no qualms at all about using something like ECS in
areas
>where I'm generating HTML from scratch, or where ECS provides
useful
>capabilities such as (as you suggest) translating database values
into
>HTML entities.  However, in pretty much every post in which you
>mention ECS, it's in the context of an alternative to embedding
HTML
>in your source code.  This, in my opinion, is not a good approach.
>Embedding HTML is awkward.  Replacing it with embedded code to
>generate HTML doesn't address the issue.

Have you looked at GNU.Weblook.

It's similar to ECS in outlook but is designed for just this very
thing.

It allows you to define the style of an object and then println the
object.

Data is pulled from the object in a defined way.

So I might define an object as an HTML form, I will have to rpvode
methods to deliver an Enum of fields and their types and then I just
do this:

HtmlWriter out=new HtmlWriter(servletoutputstream);
out.println(myformobject);

or...

out.printForm(myformobject);

I can surround the output with normal println("<b>knackers</b>") type
statements so I don't have to get too hung up on the idea of using one
particular design "philosophy".

At the moment the writer is an HtmlWriter but this is really a
misnomer because all it does is wrap tags round strings.

You can define what the tags are by extending the Writer.

Also the objects you create to have a "weblook" have only the most
abstract connection to Html or even the web. There are objects like
lists, linked lists and forms. It would be possible to build a Writer
to output the objects you have built for weblook with Swing commands.

It probably works quite well with JSP and ECS. I haven't really tried
it (too busy with the day job).


If you're interested let me know. I'll send you the advance release
URL.






Nic Ferrier
Tapsell-Ferrier Limited
http://www.tapsellferrier.co.uk

"Use Ockham Luke"

___________________________________________________________________________
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