cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@s-und-n.de>
Subject RE: [RT] Access to the object model
Date Tue, 20 May 2003 07:18:08 GMT
Stefano Mazzocchi wrote:
>
> >>
> >>>Yes, I currently don't know which way is better. Using Context and
> >>>Resolvable is somehow cleaner (IoC), but the static version is very
> >>>simple. Hmm, has anyone else an opinion?
> >>
> >>Question: why do you need this in the first place?
> >>
> > 
> > At least there are two cases where I need the object model:
> > a) to get information about the current request, so basically getting
> >    the current request/response object and any other information
> >    stored in the object model
> 
> why reinverting the control? can't you have the request controller pass
> the parameters to your component?
>
What do you mean by request controller? 
 
> > b) to store information on a per request base, so basically using
> >    the request attributes to store/retrieve information
> 
> all my IoC-control alarms went off-scale. :-)
> 
> > I think for developing components those two things are very useful and
> > needed.
> 
> I'm sorry but I still don't see it. Can you come up with a real life
> example to show your point?
> 
OK, I will try. Let's take the authentication as an example (I know that
some don't like the authentication frameworks which can be used in the
sitemap, but let's forget this for know). The framework is component
based and has to store 'somewhere' the information about the current user
for the request, so I can ask at anytime this component if currently
a user is logged-in for example.

Therefore it makes imho sense to store this information somewhere
in the line request/object model, because these objects are only valid
for the current request.

Does this make sense?

Carsten

Mime
View raw message