相比 grok 更喜欢 zope 3 的原因

发布于 2024-08-10 04:41:57 字数 145 浏览 2 评论 0原文

我熟悉 zope 2,并认为 zope 3 在很多方面都更胜一筹,就我使用过的情况而言(即主要是与 Five 一起使用)。

现在我正在考虑更深入地研究 zope 3。您是否建议更进一步并使用 grok 来代替,如果是这样,为什么? (如果没有,为什么不呢?:)

I am familiar with zope 2 and think that zope 3 is superior in many ways, as far as I've used it (i.e. 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? :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

っ〆星空下的拥抱 2024-08-17 04:41:57

一个很好的资源是 http://plone.org/products /dexterity/documentation/manual/ Five.grok/referencemanual-all-pages 。 Plone 可能是使用 zope3 的最大软件,因此 plone 使用 grok 的方式配置 zope3 的事实很重要。

我绝对建议更进一步并使用 grok。底层功能(所谓的“zope 组件架构”)是相同的,基本上只是配置的方式不同。

使用 grok,配置发生在 python 文件中,而不是 xml (.zcml) 文件中。更加舒适,尤其是当您需要弄清楚在哪里发生了什么时。

重要的是要记住:您实际上可以随意混合它们。 “只是”配置(和一些默认值)不同。因此,使用 grok 注册的事件处理程序将对使用纯 zope3 .zcml 文件配置的事件做出良好的反应!

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!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文