[ZPatterns] ZPatterns and...CMF???

Steve Alexander steve@cat-box.net
Sun, 11 Nov 2001 09:27:48 +0000

See this on integrating CMF and ZPatterns:


Steve Spicklemire wrote:

> Hmm.. What is it about CMF that requires "ZODB stubs"? (and what the 
> heck is a "ZODB stub" anyway?) Is this all "well understood" terminology 
> over on the ZODB mailing list? I don't see it mentioned much by the CMF 
> folks.

I think this is not so much a CMF issue as a Zope ObjectManager issue.

There are various conventions (aka a large and unweildy interface) to 
support if you want to make a ZPatterns-ObjectManager that gets its 
sub-objects from an RDBMS.

You can get heirarchies of objects to work with ZPatterns for a plain 
non-CMF Zope application using the __bobo_traverse__ hook. However, this 
will not work if you want to integrate this with other Zope products 
that expect to see ObjectManagers or Folders.

The "ZODB Stubs" refers to using something like Dataskin objects 
contained in conventional Zope ObjectManagers, under a folder w/ 
customizer support. There's still stuff in the ZODB for each object, and 
you can't make "virtual" objects that appear and disappear depending on 
changing data in the RDB.

Writing an ObjectManager/DataSkin class where subobjects are retrieved 
via ZPatterns would not be too hard. Perhpaps half a day to a day of 
coding and testing.

However, I'm not interested in doing it because I don't have a problem 
that requires that solution, and as Phillip said/implied, this involves 
using hackery to support volatile implementation features of ObjectManager.

Steve Alexander
Software Engineer
Cat-Box limited