cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rice Yeh" <>
Subject Re: Interblock communication
Date Tue, 19 Jun 2007 18:40:02 GMT
The following is my understanding about the current and would-be functions
of servlet-serivce:

Servlet-serivce is to have a web application divided into many blocks but
each of them behaves like a web application; It has its own context,
request, response and session. When a block s1 calls another block s2, it is
like that s1 is calling another web application; it creates another request,
have another response, even have another session in s2. Attribute values
(here attribute refers to the general meaning, it includes the parameters,
headers and attributes in request and the attributes in session and context)
in s2 can override values in s1. For example the value of an attribute a1 is
vs1 in s1, when s1 call s2, s2 might have attribute a1 with value vs2
because a1 is overridden (here, I am not sure whether it is correct to use
the word 'override'). However, for another block s3 called by s1 which does
not override a1, the value of a1 is still vs1. Repeat again, attributes here
refers to general meaning. Such overriding mechanism is not implemented yet.

Then in servlet-service, it is allowed to have a block extend another block.
Lets say s3 extends s0. When s1 calls s3 with request r1 for a function f1
which is implemented in s0. Is it still needed to create another request for
s3 to call s0 for f1? For present implementation, there is no difference in
calling a super and no-super block. However, in object-oriented thinking,
just directly passing r1 is more reasonable. Since servlet-service is not
like a OO language to have a complier, to judge whether f1 exists in s3 or
s0 might not be an easy way. Bug cocoon-2038 approaches this issue.

Anyone, please comments. I like to know whether my understanding is correct?


On 6/19/07, Grzegorz Kossakowski <> wrote:
> Hi Ralph,
> Ralph Goers pisze:
> > I guess now I know why so few people are working on 2.2
> > a) it is pretty crazy to answer a question like the one asked by
> > pointing them to a thread with dozens of posts on several parallel
> threads.
> Yes, that thread is *big* but I guess it's only place where some aspects
> where discussed.
> > b) I actually tried reading most of the posts and to be honest I
> > understood very little of it. Trying to "grasp the basic idea" by
> > reading it just left me more conused. I suspect I am not alone.
> If you have not been following recent development of servlet-service-fw
> it's very likely that you are confused. My time is limited these
> days so
> could you direct me at things/concepts that confuse you the most? I would
> not like to explain what you already know.
> > Can someone please describe how this is all supposed to work? (Hopefully
> > with as few words as possible)
> I hope to do it this evening.
> > Also, it seems silly to me to ask why a web app would need a session -
> > or maybe I misread your answer?  Frankly, I don't think it would be
> > possible for the portal block to function without a session. Heck, don't
> > continuations require one too?
> Yes, there are cases where passing session is required but as far as I
> understand servlet-service-fw design principles we should strive to
> build stateless services. I'm not sure how far we can reach with such a
> principle but I can imagine that even you need/want a session for
> some reason you can always extract needed data from the that session and
> pass the called servlet everything it needs as parameters or XML if
> you call servlet service. Isn't it at a peace with so fashionable REST
> architecture? It's just a wild thinking...
> --
> Grzegorz Kossakowski

View raw message