cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: FOM inconsistency (was Re: [VOTE] Unrestricting the FOM)
Date Wed, 09 Feb 2005 22:16:20 GMT
Antonio Gallardo wrote:

>On Mie, 9 de Febrero de 2005, 13:58, Sylvain Wallez dijo:
>  
>

<snip/>

>>Oh f*ck, that's even worse than I thought. It now returns the request
>>*attributes* because I was fooled by the implementation of FOM_Request
>>which was buggy: getIds() which lists the object's properties was
>>considering *attribute* names just as FOM_Session and FOM_Context, but
>>get() which actually gets a property was considering *parameter* names.
>>
>>What that means is that (before today's change):
>>- cocoon.context.blah == cocoon.context.getAttribute("blah")
>>- cocoon.session.blah == cocoon.session.getAttribute("blah")
>>- cocoon.request.blah == cocoon.request.getParameter("blah") and not
>>cocoon.request.getAttribute("blah").
>>
>>This is clearly inconsistent.
>>
>>Furthermore, I really don't like this naming scope filled from different
>>sources (the object itself and some other data), especially when one of
>>the sources comes from the browser.
>>
>>And what about conflicts? Fortunately the object is searched before
>>request parameters, otherwise this would be a nice security hole.
>>    
>>
>
>It was "carefully" designed. ;-)
>  
>

Flowscript is a nice invention, but custom JS wrappings have been used 
in weird ways...

>>So, what do we do? Do we keep this inconsistent behaviour, deprecate it,
>>remove it now?
>>    
>>
>
>Hmm... the problems is that "cocoon.request.blah" was released and maybe
>is used is used (by us and other people?) in a lot of places and maybe
>other peopl! :-(
>
>I think the best is to keep the 2.1.x "as is" and perhas deprecate it in
>the next (2.1.7) release and remove it in 2.2.
>  
>

Yep. Sounds reasonable.

>[Antonio while typing, pausing to answer customer's questions by phone saw
>that Sylvain already fixed the problem. Antonio is very happy and wants to
>test the last change.]
>
>...
>
>Anyway, you are faster than me! I already saw the last patch. I will check
>if it is working now as expected. Mr. Incredible, thanks for you time! ;-)
>  
>

Well, I don't have that much time for Cocoon development lately 
(although I'm using it for very fancy stuff), but one thing I really 
hate is leaving bugs unfixed in what I wrote once I've identified them ;-)

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }


Mime
View raw message