cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject is cocoon symmetry a holy grail?
Date Wed, 13 Feb 2002 21:35:27 GMT
This is explicitly provocative, but this is very important so here it
goes:

suppose we have implemented what Vadim proposed in the his earlier
thread: so 'separators' and a way to instruct the pipelines to direct
the serializers' output to different output streams.

Suppose you give this to a Cocoon user.

Oh, he loves it. Elegant, simple, very straightforward.

He uses it like this

                  pipeline1 ---> disk
                /
 POST request -* 
                \
                  pipeline2 ---> response

It looks so nice... but, wait, how do I know there was an error saving
the file? or sending an email? or printing the PDF on the printer? or
stream a request to nuke the alien insects orbiting around jupiter?

Hmmmm, I have to stop the pipeline2 until the pipeline1 has finished and
returned me an error code. Gosh, I have to implement a way to pass
things... a shared memory? ah, no should I implement Contextualizable?
hmmm....

oh, but look: what if I do something like

 request -> pipeline -> response
              | ^
              v |
              disk

Now I did save the file and I know the the error right there.

what? you said it was more complex because the serializer was easier to
use?

Bah, I implemented a "serializing" component that gave me that service
in a few calls, the cocoon serializers are simply sitemap components
wrapping this other avalon component. A sitemap-semantic adaptor, if you
with. I got the same functionality in my code using Avalon and Java. So
I wrote a simple transformer that did all this, save where I wanted with
a few lines of code and that was it.

.....

I'm starting to think this 'separator' concept is going to be a
nightmare for users, also because it seems to promising.

But can it stand the apparent elegance expectation?

remember Pascal: I'm writing you a long letter because I lacked the time
to make it shorter.

Which can be translated with: I'm adding more sitemap semantics, because
I lacked the time (will?) to make it shorter and force you in directions
that we know are better for you down the road.

Comments?

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<stefano@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message