[TransWarp] Component hierarchy traversal

Radek Kanovsky rk at dat.cz
Wed Oct 1 13:53:06 EDT 2003

On Wed, Oct 01, 2003 at 01:06:53PM -0400, Phillip J. Eby wrote:

> >There are some smart components that implements IResourceComponent
> >interface. They should manage their persistent resources on demand
> >(Create/Drop/Check/...): EntityDM can create database tables, ImageCache
> >can prepare directory sturcture, SQLConnection can create some global
> >sequences, etc.
> So, you're performing a global operation like "Create" and want it to 
> propagate to all the IResourceComponents?


> If that's the case, then why not simply require all the applicable 
> components to be created upon assembly?  It doesn't seem as though there 
> should be that many levels of parents that would need to know about the 
> assembly requirement.

There were some intermediate component bindings without uponAssembly flag
set to True, but there is no problem to add this flag to them. It will
be sufficient and simplest solution for now.

> (It does seem that it might be useful to be able to force Make() bindings 
> to be flagged 'uponAssembly' if they are for a class, and the class has any 
> uponAssembly bindings.  But, this wouldn't be doable with any other kind of 
> binding, even Make('module.Class') bindings.  Hmmm.  Of course, you could 
> do this by hand, but it does seem that some kind of visible indication 
> would be helpful.)

Do you mean that binding.Component itself can somehow indicate "all
bindings to me have uponAssembly=True"?



More information about the PEAK mailing list