----- Original Message -----
From: Dave Bryson <[EMAIL PROTECTED]>
To: Turbine <[EMAIL PROTECTED]>
Sent: Wednesday, April 05, 2000 5:19 PM
Subject: Re: More WebMacro stuff...


> John McNally wrote:
> >
> > It would seem that it might have been good to have DefaultPage write to
> > data.getOut() in the event that the Layout was null.
>
> Even if layout is null, can't I still add to the RunData document and use
it
> as normal?

Yes.

<snip>
>
> In this case I don't see a need to use getOut() this was just an initial
> thought.
>

If you are using layouts the Document is a good way to go.  If you are not
using layouts and are wanting to write the majority of the page in one
document, it would probably be better to go all the way and be able to
include all the tags that make up an html document.  If you don't go all the
way to writing directly to the response stream, you lose  the benefits of
using layouts and do not maximize your return.

1.  You want things to be easier for designers.  To use layouts you must
define some way for the designers to add javascript and css to the <head>.
I did this for FM and will do it for WM when I need it (since I seem to be
only the one advocating using layouts.)  However, if you  are forgoing
layouts to make things as straightforward as possible, you should want the
designers to be able to add js and css in the usual way.  This will enable
the use of  more tools as well.

2.  When using Document you must build the entire page before returning it,
this must be an acceptable delay in order to make using layouts practical.
If you are not going to use layouts, however, why do you want to have to
wait.  Just send things directly to the stream.  I think this might be the
more efficient way of doing the handleTemplate method you are looking for.
If someone has specified that they are using layouts have BaseWMScreen
construct a PrintWriter around a StringWriter and pass it to the
handleTemple method.  Then stringWriter.toString()  on return and wrap that
in a nonfiltered StringElement to return from the Screen.  If they have
specified no layouts.  Pass handleTemplate a PrintWriter built on the
response output stream and return null from the screen.

> After looking at things again, I don't really think we need to return a
response
> directly.

You don't have to.  I thought this was something you wanted.

>
> I haven't put much thought into this yet, maybe I don't need to
> change it, but  I was looking for something more
> efficient than a String.  I notice you use the StringElement in a
> couple place with FreeMarker. Would this be better that a String?
>
StringElement is only used as a subClass of the method return type
ConcreteElement.

John McNally




------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to