Shane Hathaway wrote:

Dominik Huber wrote:

We should have an application/framework-level hook within the site.zcml
that is processed before *-configure.zcml are invoked.

Problem: A framework package 'b.x' registers a dedicated menu 'b_views'.
A package 'a.x' using 'b.x' should be able to register menu items
refering 'b_views'. The initialisation will fail because 'a.x' is loaded
before 'b.x' and therefore  'a.x' cant register any view to 'b_views'
because the menu does not exists yet.

Proposed solution: package includes named *-app.zcml will be invoked
before the regular *-configure.zcml package includes (Compare example
site.zcml below)

Any objections?

That might be a reasonable band-aid. However, directives ought to have
no load-time dependencies on other directives. The configuration
directives should defer any interconnections and registration until the
whole configuration is loaded.

In principle +1, but their are still cases where that idealism will break.
Zope solves that problem using the direct include <include package="" /> that is processed before the others *-configure.zcml.

It's the old dispute between holism and reductionism.
In the modern system theory it is the differentiation between heap and system.
In that respect we need a way to register *parallel* systems (applications or frameworks) including


Zope3-dev mailing list

Reply via email to