Observer / Notification Interface Proposal
I have started a page for an implementation of the GangOfFour Observer pattern within Zope: <URL http://www.zope.org/Members/michel/Projects/Interfaces/ObserverAndNotification> Please comment, either here or in the wiki. Tres. -- =========================================================== Tres Seaver tseaver@digicool.com Digital Creations "Zope Dealers" http://www.zope.org
At 07:19 PM 5/24/00 -0400, Tres Seaver wrote:
I have started a page for an implementation of the GangOfFour Observer pattern within Zope:
<URL http://www.zope.org/Members/michel/Projects/Interfaces/ObserverAndNotificat ion>
Please comment, either here or in the wiki.
Is this only for events occurring within a transaction, or across transactions? If across transactions, how do you intend to handle persistent references, acquisition, and cross-database references? (My suggestion would be to use a path to the callable.) Second, I think there should be an opportunity for the observer to specify more detail about what it wants to be called *for*. I.e., either a specific event or an event mask, to avoid unnecessary calls for irrelevant events. I realize this is all very implementation oriented, but that's me. :) (Oh, btw on "ObserverInterface", I'm guessing you mean the contract requires that *observable* not worry about delays, not the other way around.)
Tres Seaver wrote:
I have started a page for an implementation of the GangOfFour Observer pattern within Zope:
<URL http://www.zope.org/Members/michel/Projects/Interfaces/ObserverAndNotification>
Please comment, either here or in the wiki.
I'll do both, this is absolutely a desperately needed feature in the ZCatalog. Currently, Cataloged items must take responsibility for notifying a catalog of their changes instead of the ZCatalog observing them. Amos and I talked about this over Pizza a couple weeks ago but we were thinking from a pretty Catalogcentric view; or at least I was. I was considering an interface like the new Security API that could be imported in python and used to discover and notify catalogs of object changes. But this now seems to me to be some kind of pattern where objects need to discover an appropriate or canonical resource, like a catalog. This interface should be defined also, so that newly-born objects can notify a resources of their existence. I've added this to the InterfacesWiki http://www.zope.org/Members/michel/Projects/Interfaces/Discovery Thoughts on how they relate? Are they the same thing? -- -Michel Pelletier http://www.zope.org/Members/michel/MyWiki Visit WikiCentral for the latest Zen: http://www.zope.org/Members/WikiCentral
participants (3)
-
Michel Pelletier -
Phillip J. Eby -
Tres Seaver