[Zope] Zope Book mentions "Fragility"

Dylan Reinhardt zope at dylanreinhardt.com
Sun Nov 16 13:38:56 EST 2003


On Sun, 2003-11-16 at 09:44, Brad Allen wrote:
> Hi, I'm a Zope newbie, still in the process of reading the
> documentation and working on my first Zope project. I'm at the stage
> of organizing all my scripts and DTML documents in a folder hierarchy,
> but am unclear on how to design against the "fragility" issues
> discussed in the Zope book. Should I try to avoid a deep folder
> hierarchy and go with something more flat (but less well-organized?)
> Does anyone have any recommendations for me?

The key here is discipline, especially if there is more than one person
adding objects to the site.

A shallow hierarchy might reduce the opportunity for accidental
duplication of object IDs... but that approach does nothing to address
"magic" names (the real problem here) and makes enforcing levels of
access more difficult.  Since levels of access are your primary defense
against one user breaking another user's namespace, shallow won't help.

IMO, the hierarchy should be at least as deep as the number of levels of
access you want.  You may want *more* hierarchy than that if your
information architecture requires it... but no less.

Some best practices:
1. Write things down.  In particular, what "magic" names are 
   provided by custom objects?
2. Design and enforce a security policy.  
3. Reduce usage of objects as "global" variables.
4. Create a special naming scheme for "magic" names and objects
   that *are* used as variables.
5. Plan on doing some troubleshooting anyway.  :-)

HTH,

Dylan




More information about the Zope mailing list