cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ricardo Rocha" <rica...@apache.org>
Subject RE: Content-length
Date Sun, 23 Jan 2000 21:38:08 GMT
Ross Burton wrote:
> This works now, but what about the mythical Cocoon 2, where the
> sending of content may happen before all of the data has been
> processed, because of the SAX event model?

Nicolás Lichtmaier wrote:
>  I think that sending data when the process hassn't finished is a
> very good thing for certain pages: long pages, pages that come
> with a slow backend.
> I'd say that 90% time pages are small (less than 20k). And what do
> you get by sending them to the client before (a couple of ms) the
> page is done? So I'd said that buffering should be the default,
> and it should be turned of by pages which need it.

I agree enthusiastically: most pages are small in size thus requiring
a relatively modest amount of storage. In the Cocoon environment,
though, small doesn't necessarily imply "simple": more often than not
otherwise "small" web pages will contain (possibly costly) dynamically
generated content and will be subject to complex transformations.

It's in this typical context that I feel there's a right place for DOM.
I find DOM much better suited for some data-oriented, potentially
complex transformations whose processing model results in final
content being known only at the latest stage (thus enabling buffering).
As an added bonus, yes, this includes the ability to properly set the
content length whenever possible.

This reminds me of a [heretical? :-)] post from Clark Evans in regard
to the DOM/SAX dichotomy. Phrased as "DOM is right, SAX is wrong"
I'd have expected it to trigger a flame war, but there was little follow
up (mea culpa, too). I wish to hear more from Clark about this...


Mime
View raw message