IoC Speculations

Colin Clark colin.clark at utoronto.ca
Tue Jun 16 02:54:01 UTC 2009


Hey,

Sorry for the delay in responding to this thread, but one further  
question...

On 8-Jun-09, at 2:26 PM, Antranig Basman wrote:
>> A couple of questions/comments for you, Antranig:
>>
>>  * Do we need to qualify properties with "that," or can it simply be
>> assumed? Where else could a subcomponent pull dependencies from,
>> except from its parent? So for example, your code here:
>>
>> fluid.demands("fluid.pager", "fluid.pager.renderedPageList",
>>        ["that.container", "that.events", "that.pagerBar.options",
>> fluid.COMPONENT_OPTIONS, "that.options.strings");
>
> Yes, my idea for qualification was to be able to refer not only
> specifically to the "immediate that", that is, the "that" of the
> component which is most immediately executing initSubcomponents,
> but also any "outer nested thats" - that is, any others in whose
> initSubcomponents this instantiation may be nested. This is what
> is proposed about 3/4 of the way down with syntax perhaps like
> "that{fluid.pagerBar}.options".
> I also imagined that any string not beginning with "that" would
> simply be resolved as a global EL path, for example to some
> constants that were sitting in the fluid.* space or some others.

I'm still not entirely clear on this. What exactly are we referring to  
with the {fluid.pagerBar} qualification? Perhaps a concrete example  
might clarify?

>>  * As far as naming goes, my vote is to call the dependency registrar
>> fluid.dependencies() or fluid.wiring()
>
> How about fluid.depends()?

Works for me. It's descriptive but fairly short.

Colin

---
Colin Clark
Technical Lead, Fluid Project
Adaptive Technology Resource Centre, University of Toronto
http://fluidproject.org