简体   繁体   中英

Reasons to prefer zope 3 over grok

I am familiar with zope 2 and think that zope 3 is superior in many ways, as far as I've used it (ie primarily with Five).

Now I'm considering to dive deeper into zope 3. Would you recommend going even one step further and use grok instead, and if so, why? (and if not, why not? :)

A good resource is http://plone.org/products/dexterity/documentation/manual/five.grok/referencemanual-all-pages . Plone is probably the biggest piece of software that uses zope3, so the fact that plone uses grok's way of configuring zope3 counts for something.

I'd definitively recommend going one step further and to use grok. The underlying functionality (the so-called "zope component architecture") is the same, is is basically only the way it is configured that is different.

With grok, the configuration happens in your python files instead of in xml (.zcml) files. Much more comfortable, especially when you need to figure out what happens where.

Important to keep in mind: you can mix them up virtually at will. It is "just" the configuration (and some defaults) that are different. So an event handler registered by using grok will react just fine to an event that is configured with pure zope3 .zcml files!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM