AW: [Zope3-dev] Re: Recursive containment constraints
dev at projekt01.ch
dev at projekt01.ch
Thu Sep 16 19:54:21 EDT 2004
Tres Seaver wrote:
> Cc: Dominik Huber
> Betreff: [Zope3-dev] Re: Recursive containment constraints
>
>
> Stephan Richter wrote:
> > On Wednesday 15 September 2004 09:01, Dominik Huber wrote:
> >
> >>Month ago I read the contenttype part of stephan's book. at
> that time
> >>he used setTaggedValue to solve recursive containment constraints:
[...]
>
> In reality, I think we would be better off moving the constraint
> declarations out of the classes; that would both remove the "forward
> reference" problem and make it easy to move to a "containment
> constraint
> registry" solution when that became available.
>
> My biggest reason for wanting this is that the constraints
> are *policy*,
> which might vary from site to site; making them intrinsic to
> the class
> makes it harder to reuse the container / item classes in a site with
> different policies. This consideration would suggest moving the
> constraint declarations to ZCML, e.g.:
>
> <content>
> ....
> <contains interface=".interfaces.IFooItem" />
> </content>
> <content>
> ....
> <container interface=".interfaces.IFooContainer" />
> </content>
I agree,
This looks much nicer for to write and support.
I also like the idea to put all the variable configuration
stuff out of a class. This makes it more reuseable.
Regards
Roger
Projekt01 GmbH
_____________________________
END OF MESSAGE
More information about the Zope3-dev
mailing list