[Zope3-dev] directory hierarchy proposal

Martijn Faassen faassen@vet.uu.nl
Tue, 10 Dec 2002 20:15:01 +0100


Barry A. Warsaw wrote:
> 
> >>>>> "MF" == Martijn Faassen <faassen@vet.uu.nl> writes:
> 
>     MF> As promised, here's the directory hierarchy renaming
>     MF> proposal. This is based on discussions I had with Jim and
>     MF> others last week at the Infrae Sprintathon.
> 
> Here's the second stated goal:
> 
>     - make import statements less verbose. This is done by making the
>       hierarchy shallower and the package/module names shorter.
> 
> But you'll have imports like zope.app.browser.content.dtml and
> zope.app.publication.browser.traversal (if I'm reading that page
> correctly ;).  Okay, I've picked two of the deepest packages but
> still, how does that accomplish the second goal of the renaming?

from zope.app.publication.browser.traversal import PublicationTraverser

is still a lot shorter than

from Zope.App.ZopePublication.Browser.PublicationTraverse import PublicationTraverser

similarly

from zope.app.browser.content.dtml import DTMLPageEval

is shorter than

from Zope.App.OFS.Content.DTMLPage.Views.Browser.DTMLPageEval import DTMLPageEval

so I think we're doing quite well on that goal. :)

They're still verbose, but less verbose by a lot.

> Note that I brought up the same question in the zodb-dev list, since
> fitting ZODB into the new naming scheme would actually make its import
> paths longer!

That's true.

Regards,

Martijn