Re: [Zope3-dev] site.zcml (ftesting.zcml) extension

2005-04-25 Thread Shane Hathaway
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 your specific example, a.x should be able to register views on any
menu, regardless of whether b_views has been loaded yet.

Shane
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] site.zcml (ftesting.zcml) extension

2005-04-25 Thread Stephan Richter
On Monday 25 April 2005 09:03, Dominik Huber wrote:
 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.

I am pretty sure we had a solution for this problem already. I think you 
simply do:

include file=a-configure.zcml

inside b-configure.zcml in package-includes.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



RE: [Zope3-dev] site.zcml (ftesting.zcml) extension

2005-04-25 Thread Roger Ineichen
Hi Shane

From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On 
 Behalf Of Shane Hathaway
 Sent: Monday, April 25, 2005 3:38 PM
 To: Dominik Huber
 Cc: zope3-dev@zope.org
 Subject: Re: [Zope3-dev] site.zcml (ftesting.zcml) extension
 
 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 your specific example, a.x should be able to register views on any
 menu, regardless of whether b_views has been loaded yet.

This would be nice. But it isn't.

The addMenuItem directiv has dependency to the menu directive
if you use a own Adding view.

That's the only reason where we see right now. 

The alphabtice order of configure.zcml like Stephan proposed
is one solution. But I like a more explicit solution for this
like Dominik proposed with a additional application level
for 3rd party packages.

Regards
Roger Ineichen

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] site.zcml (ftesting.zcml) extension

2005-04-25 Thread Dominik Huber
Stephan Richter wrote:
On Monday 25 April 2005 09:03, Dominik Huber wrote:
 

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.
   

I am pretty sure we had a solution for this problem already. I think you 
simply do:

include file=a-configure.zcml
inside b-configure.zcml in package-includes.
 

'a' does not know 'b', but 'b' depends on 'a'.
The menu 'b_view' is in that respect something like a meta-information 
on the application/framework level.
Within Zope this application-level-part is handle by the direct iclude 
'include package=zope.app /' which is proceeded before all 
*-configure.zcml's.
Other application/framework may need similar kind of configurations for 
establishing theirs meta-application-level.

Regards,
Dominik
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com


Re: [Zope3-dev] site.zcml (ftesting.zcml) extension

2005-04-25 Thread Stephan Richter
On Monday 25 April 2005 10:52, Roger Ineichen wrote:
 The alphabtice order of configure.zcml like Stephan proposed
 is one solution. But I like a more explicit solution for this
 like Dominik proposed with a additional application level
 for 3rd party packages.

I did not propose to have alphabetical order. I said to write in 
a-configure.zcml:

configure
  include file=b-configure.zcml /
  include package=apps/a /
/configure

This used to work. I really do not want to add yet another layer, because it 
will never end.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] site.zcml (ftesting.zcml) extension

2005-04-25 Thread Stephan Richter
On Monday 25 April 2005 11:08, Dominik Huber wrote:
 Stephan Richter wrote:
 On Monday 25 April 2005 09:03, Dominik Huber wrote:
 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.
 
 I am pretty sure we had a solution for this problem already. I think you
 simply do:
 
 include file=a-configure.zcml
 
 inside b-configure.zcml in package-includes.

 'a' does not know 'b', but 'b' depends on 'a'.

It does not have to; only b knows about a. Unless we cannot find a better 
solution (which I really want to try hard finding), the suggested solution 
right now is not acceptable. Dominik, please try my solution first.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] site.zcml (ftesting.zcml) extension

2005-04-25 Thread Dominik Huber
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=zope.app / 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 zope.app.

Regards,
Dominik
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com