[Zope-dev] Request typing (to get the xmlrpc layer discussion finished)

Christian Zagrodnick cz at gocept.com
Mon Dec 17 08:22:34 EST 2007


Hi,

a couple of weeks ago there was some discussion about the skin/layer 
support for XML-RPC which I implemented without asking (shame on me). 
As some time has passed now everybody could have some fresh thoughts 
about it.


Let me first summarise:

* Skin and layers should be seen as typing the request.

* There are no general objections against having layers for XML-RPC.

* There are objections against using ++skin++ for XML-RPC, ++api++ 
would be fine.


Discussing the issue here at gocept again we've come to the following:

There are different kinds of request (BrowserRequest, XMLRPCRequest, 
FTPRequest, …) which depend on the “channel” or server zope is accessed 
through.

Then, depending on the kind of request, it often is desirable to 
further type the request:

* a skin for browser requests
* an API for xmlrpc requests
* maybe different listings or content views for webdav

We’d like to codify this understanding (the general concept of marking 
a request with a type) using a general IRequestType which all specific 
type implementations (skins, APIs, ...) are derived from. In our view 
this allows for understandably named implementations for each channel 
but still provide a common base.

Therefore we propose to:

* Create in zope.publisher.interfaces:

class IRequestType(zope.interface.interfaces.IInterface):
      pass

* Rename IXMLRPCSkinType to IXMLRPCAPIType(IRequestType) and create a 
traverser ++api++ for IXMLRPCApiType.

* Use IRequestType as new base of IBrowserSkinType (instead of IInterface).

* Do *not* provide any traverser for IRequestType since the traversers 
should be close to the “channel” so it is easy to understand what is 
happening. If the traverser name is too far fetched we end in confusion 
like with skin for xmlrpc.


Regards,
-- 
Christian Zagrodnick

gocept gmbh & co. kg  ·  forsterstrasse 29 · 06112 halle/saale
www.gocept.com · fon. +49 345 12298894 · fax. +49 345 12298891





More information about the Zope-Dev mailing list