The PEAK Developers' Center   Diff for "ComposingHierarchies" UserPreferences
 
HelpContents Search Diffs Info Edit Subscribe XML Print View
Ignore changes in the amount of whitespace

Differences between version dated 2005-02-24 17:01:15 and 2005-05-12 08:35:35 (spanning 2 versions)

Deletions are marked like this.
Additions are marked like this.

 
 
--Joel Boehland
 
= Discussion =
 
So, it seems to me:
 
{{{
#!python
class SimpleCmp(binding.Component):
    __eggs = binding.Make(Eggs, offerAs=[IEggs, EGGS_PROPERTY])
}}}
 
This means: "When you make a SimpleCmp, it has within it a variable __eggs. __eggs is an Eggs. When someone asks for the SimpleCmp's IEggs interface, patch it through to my internal __eggs. And when they ask for the SimpleCmp's EGGS_PROPERTY, also patch them through to my internal __eggs."
 
It also seems that: If a component has another component within it, that if the child component requests an interface, it firsts check ''locally'' for it, and if it's not found locally, it checks it's ''parent'' for it. And if not there, still higher up the chain (grandparent.)
 
Am I understanding right?
 
Next, I naturally wonder: "What for? What kinds of things do you get from this?" I'm not saying there isn't, I'm just not used to thinking this way. I'd like to get excited about it, by understanding what it can do for me.
 
-- LionKimbro [[DateTime(2005-04-17T13:58:41)]]
 
I think it is done to have a flexible InversionOfControl mechanism. That is the wiring between elements is made "magicaly". It's very flexible since you can change a piece with another without worrying to change the code of objects using it or an object doesn't have to know which object uses it.
 
-- AlexG [[DateTime(2005-05-12T14:30:00)]]

PythonPowered
ShowText of this page
EditText of this page
FindPage by browsing, title search , text search or an index
Or try one of these actions: AttachFile, DeletePage, LikePages, LocalSiteMap, SpellCheck