[Grok-dev] Re: grokcore.view -> grokcore.browser

Luciano Ramalho luciano at ramalho.org
Sat Jul 19 09:15:47 EDT 2008


On Sat, Jul 19, 2008 at 8:39 AM, Martijn Faassen <faassen at startifact.com> wrote:
> I don't really like the convention 'browser' very much, nor do I think that
> 'browser' is such a good name. 'browser' is somewhat overloaded as a term -
> people might think it's a form of object browser, or support for particular
> web browsers, or non-existent relationships with things like
> zope.testbrowser, and the like. In addition, Grok hasn't been following the
> Zope 3 'browser' convention in Grok applications at all. The 'browser'
> convention only makes sense to people already very familiar with Zope 3. So,
> if you tell a random python programmer that grokcore.browser's central
> purpose is to make available grok.View and friends, they'd wonder why it's
> not called grokcore.view.

I never liked the use of the name 'browser' in Zope 3 either. In
Philipp's book, this excerpt demonstrates how odd the name is:

"""
[...] different views of the sema object are invoked for different
types of requests. Zope knows the following request types:

- HTTP/WebDAV
  (zope.publisher.interfaces.http.IHTTPRequest)
- Browser
  (zope.publisher.interfaces.browser.IBrowserRequest)
- XML-RPC
  (zope.publisher.interfaces.xmlrpc.IXMLRPCRequest)
- FTP
  (request interface zope.publisher.interfaces.ftp.IFTPRequest)

"""
(Web Component Development with Zope 3, 2nd edition, p. 96)

The word "browser" seems out of place among the others, which name
specific protocols. The problem is not in Philipp's text: he is just
reflecting the names in the API.

With the addition of JSON and REST, now is a good time to rethink the
"browser" name.

Cheers,

Luciano


More information about the Grok-dev mailing list