You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Ralph Goers <Ra...@dslextreme.com> on 2005/03/01 00:35:08 UTC

Re: [RT] A Unified Environment Model?

Daniel Fagerstrom wrote:

>
> API
> ---
>
> OM is a Map. IMs are like maps but have both construction and runtime 
> configurations and also interpret the "key" in much more sofisticated 
> ways than maps normally do.
>
> WDYT?
>
> /Daniel

Wow.  Cocoon already has an ObjectModel Map which is used all over the 
place.  If you want to integrate FOM with the rest of Cocoon maybe 
that's the place to start.

I have a feeling your definition of OM and the existing ObjectModel 
could be integrated together, but perhaps not without some amount of pain. 

Although I like the ease of using a simple Map, it does have some 
drawbacks in the fact that you can't really "trust" that the objects 
returned are actually of the correct type (i.e. - you really should do 
an instanceof to verify it).  I also like that one can always locate the 
current object model via ContextMap.getCurrentContext.get("objectModel") 
from anywhere.

Re: [RT] A Unified Environment Model?

Posted by Daniel Fagerstrom <da...@nada.kth.se>.
Ralph Goers wrote:

> Daniel Fagerstrom wrote:
>
>> API
>> ---
>>
>> OM is a Map. IMs are like maps but have both construction and runtime 
>> configurations and also interpret the "key" in much more sofisticated 
>> ways than maps normally do.
>>
>> WDYT?
>>
>> /Daniel
>
> Wow.  Cocoon already has an ObjectModel Map which is used all over the 
> place.  If you want to integrate FOM with the rest of Cocoon maybe 
> that's the place to start. 

The idea is that the unified script object model is a script friendly 
embeding of part of the information in the ObjectModel Map.

> I have a feeling your definition of OM and the existing ObjectModel 
> could be integrated together, but perhaps not without some amount of pain.

Any ideas how?

> Although I like the ease of using a simple Map, it does have some 
> drawbacks in the fact that you can't really "trust" that the objects 
> returned are actually of the correct type (i.e. - you really should do 
> an instanceof to verify it).  I also like that one can always locate 
> the current object model via 
> ContextMap.getCurrentContext.get("objectModel") from anywhere.

Something like that could be useable for the unified scripting object 
model as well.

/Daniel