[Grok-dev] could we re-name grok.IRESTRequest to grok.IRESTLayer?

Martijn Faassen faassen at startifact.com
Thu Dec 18 09:50:37 EST 2008

Brandon Craig Rhodes wrote:
> Brandon Craig Rhodes <brandon at rhodesmill.org> writes:
>> the way that an `IRESTRequest` is actually used, always, and in every
>> context that I can find it used, is as a base class for a REST layer.
>> Therefore, I think that it should be renamed to `IRESTLayer`, and that
>> `IRESTRequest` should be left around as a synonym to avoid breaking
>> old code that has already used that name - but that the name should be
>> put through deprecation, either now, or some time after 1.0.
> Wait - it looks like more needs to be said: an argument could be made
> either for renaming it to `IRESTLayer`, or to `IRESTSkin`, and I cannot
> tell which is the preferred terminology.  If we are going to keep the
> directive named `grok.restskin()`, then we should really name the
> interface `IRESTSkin` to match. 

That's not how layers and skins work in Zope 3. The idea is you may have 
more than one layer, and combine them into a single layer by multiple 
inheritance and mark *that* one as a skin. A skin means it's actually 
going to be published online. A layer is just a component of a skin. Of 
course in simple cases there's just one layer that's a skin, but it's 
common to subclass layers too.

Since Grok's REST is modeled after the layer/skin system for views, it 
should follow the same pattern.

I originally called rest skins "rest protocols", but that name changed 
in the recent refactoring too.

The naming discussion IRESTLayer versus IRESTRequest is valid, and I'll 
move to that part of the thread now. :)



More information about the Grok-dev mailing list