Hello,

* 2009-08-06 18:55, Martijn Faassen wrote:
> > I was analyzing zope.app.publisher, and I found that it would be possible
> > to remove its dependency on zope.container because the latter is only used
> > in zope/app/publisher/xmlrpc/configure.zcml to declare thee views like
> > this:
> > 
> >   <view
> >       for="zope.container.interfaces.IItemContainer"
> >       type="zope.publisher.interfaces.xmlrpc.IXMLRPCRequest"
> >       provides="zope.publisher.interfaces.xmlrpc.IXMLRPCPublisher"
> >       factory="zope.container.traversal.ItemTraverser"
> >       permission="zope.Public"
> >       />
> > 
> > I think these snippets should me moved to zope.container's configure.zcml,
> > where we already have other traversers.
> > 
> > Do you agree with this change?
> 
> I remember looking at this relationship in the past but I don't remember 
>   noticing it was this easy. If this looks possible, by all means go ahead.

I don't think this change would be correct; we have a weird situation,
because:

 - zope.app.publisher depends on zope.container only because xmlrpc's
   configure.zcml defines a couple of traversers for some zope.container
   interfaces (providing zope.publisher.interfaces.xmlrpc.IXMLRPCPublisher);

 - zope.container by itself depends on zope.publisher, because it defines
   some traversers for some zope.container interfaces (providing
   zope.publisher.interfaces.browser.IBrowserRequest).

It is weird because XMLRPC and Browserrequest are handled in different
ways: the former is configured by zope.app.publisher, the latter by
zope.container itself.

Jim suggested that zope.container shouldn't assume that I want to use
zope.publisher, and thus it is not a good idea to move the configuration of
the XMLRPC traversers to zope.container.

My knowledge of the zope.publisher is too limited to do any change in this
area, but to me it looks like these configurations (both of them) should be
perfomed by zope.app.publisher (removing the dependency zope.container ->
zope.publisher), but conditionally (zcml:condition) only if zope.container
is installed, (removing the dependency zope.app.publisher ->
zope.container).

Anyway, I'm not going to dig more into this problem until we clearly define
the ZTK and the policies to manage it. :)

Best regards.

Fabio
_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to