[Zope-dev] CatalogPathAwareness and zope.lifecycle

Sascha Welter zopelist at betabug.ch
Sun Apr 17 11:15:46 EDT 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

(Sun, Apr 17, 2011 at 02:58:12PM +0200) Charlie Clark wrote/schrieb/egrapse:
> As for an explanation of how to use events or simply getting a grasp of  
> using the ZCA in Zope 2 I can highly recommend Philip von Weiterhausen's  
> book on Zope 3. In many ways this is the missing Zope manual.

Charlie,

I really like this quote from the Pyramid documentation:

"While the ZCA is an excellent tool with which to build a framework such
as Pyramid, it is not always the best tool with which to build an
application due to the opacity of the zope.component APIs."

- From my point of view, wearing my "application developer hat",
event handling is YAGNI. In my estimate
- - 90% of Zope Products/Apps only use manage_afterAdd or use none of
  manage_after*
- - the other 9.9% use manage_afterDelete and/or some combination for
  handling copy+paste.
- - The other 0.1% thought very hard to find something else they
  thought they needed to do with events.

So a full feature, "we have it all for you" framework like Zope has been
doing fine to offer these few in an easy and simple way. Pyramid gives
me full event handling as an optional extra, because Pyramid is a "you
pay only for what you eat" framework and I might not even need those few
that Zope offers out of the box - or I might be in the 0.1% and need the
full deal.

Interfaces is even more YAGNI in the role of the application developer.
(Which is what the pyramid doc is saying there IMHO.)
I don't write a framework where you can swap out one templating system
for another, I just write an app that is finished at one point in time.

As for Philip's book, I guess you are aware that lots of it is already
outdated. Something to keep in mind and tell people when one recommends
that book. (Philip is well aware of that and his "in hindsight, the book
should have been free/open" blog post is quite interesting.)

> @Sascha I'm not sure if this will answer your question but you might want  
> to look at how Products.CMFCore.CatalogAware works.

Thank you.
This would answer my question if someone told me to take over
maintenance of CatalogAware / CatalogPathAware in Products.ZCatalog
and I'd have to rewrite it instead of just writing tests and if I then
asked the question "where do I start?".

Regards,

Sascha

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)

iD8DBQFNqwQhpYOq9ODq/IoRAs9VAKCAFxvCYu6QX2QSSfibt01rFAr2lQCfVezW
NkycMDv2jMUXRLxcgC+GI7k=
=xmWB
-----END PGP SIGNATURE-----


More information about the Zope-Dev mailing list