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

Christian Zagrodnick cz at gocept.com
Fri Dec 21 03:58:16 EST 2007


On 2007-12-18 17:32:01 +0100, Stephan Richter 
<srichter at cosmos.phy.tufts.edu> said:

> On Monday 17 December 2007, Christian Zagrodnick wrote:
>> 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.
> 
> Since the original implementation and discussion, I had a lot more time to
> 
> discuss this proposal with Roger (who was heavily in favor of it), think
> about it, and work on other HTTP-based protocols.
> 
> Thus, I am now in favor of a solution. It is good that you laid out the
> implementation details as well.
> 
>> Let me first summarise:
>> 
>> * Skin and layers should be seen as typing the request.
> 
> Well, that's what they actually do.
> 
>> * There are no general objections against having layers for XML-RPC.
> 
> I think there were pretty strong objections to layers for XML-RPC and all
> other non-browser HTTP requests.

Yes there*were. I had the impression that once it got clear what it 
means everybody was sort of fine.

> 
>> * There are objections against using ++skin++ for XML-RPC, ++api++
>> would be fine.
> 
> I think I was against anything typing non-browser related.

> 
>> Therefore we propose to:
>> 
>> * Create in zope.publisher.interfaces:
>> 
>> class IRequestType(zope.interface.interfaces.IInterface):
>>       pass
> 
> This is good.
> 
>> * Rename IXMLRPCSkinType to IXMLRPCAPIType(IRequestType) and create a
>> traverser ++api++ for IXMLRPCApiType.
> 
> This would not fulfill the use case that Fred brought up in his response to
> 
> the proposal. I really like his points and his historical considerations.
> 
> I think, it would be ideal to have one way to specify the request type, may
> be
> through ++type++. If, for legacy reasons, ++skin++ is easier to use, then
> that's fine with me too.

Yes. ++skin++ for XML-RPC is actually in the 3.4 branch already. So 
it's not easy to just remove it.

> 
> Let's widen our considerations to JSON and REST as well.

Would it be possible to detect a JSON vs. normal HTTP request like it 
happens with XML-RPC?

> 
> What do others think?

Yes, what do others think? It's quite hard for me to do anything 
because the discussion is kind of nebulous.

> 
>> * Use IRequestType as new base of IBrowserSkinType (instead of IInterface
> ).
> 
> Okay.
> 
>> * 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.
> 
> Right, this is very important. The same rule should apply for IBrowserReque
> st;
> see the other discussion thread of this mail.


-- 
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