[Zope3-dev] Re: Separate presentation packages
Philipp von Weitershausen
philipp at weitershausen.de
Sun Feb 15 17:57:54 EST 2004
Philipp von Weitershausen wrote:
> <thinking-out-loud-mode>
>
> What if we had
>
> - zope.app -- containing flat packages with application code
> - zope.browser -- containing just as flat packages with browser code
> - zope.webdav -- ........ with WebDAV presentation
>
> Hmm... What about a different top-level package?
>
> - zope.app -- containing flat packages with application code
> - zopepresent.browser -- contains flat browser packages
> - zopepresent.webdav -- contains flat WebDAV packages
>
> Or a different top-level package for each presentation type?
>
> - zope.app -- containing flat packages with application code
> - zopebrowser -- contains flat browser packages
> - zopedav -- contains flat WebDAV packages
>
> </thinking-out-loud-mode>
I took this crazy idea one step further: Why not make zope.app a
top-level package as well?
Consider:
- zope -- contains general application code, just like now
- zopeapp -- like zope.app above (flat packages, etc.)
- zopebrowser -- like above
- ...
I really like this one. And it'll make packaging easy, too. Don't want
the Zope application server? Don't install zopeapp! Don't want browser
code? Don't install zopebrowser!
Using several top-level packages has the following advantages:
- The package hierarchy is not deep at all. In fact, it'll be even less
deep than with zope.app.foo and zope.app.foo_browser...
- Browser and application packages are not in the same container
package. That'll help to make the pluggability of presentation code
quite clear.
- It'll make source code navigation pretty easy. You have zope.XYZ or
zopeapp.XYZ and need to find its browser views? Well, simply look in
zopebrowser.XYZ. Pretty easy to find, I think.
I see the following disadvantages:
- The top-level package namespaces will be bloated. This danger is
limited, though, since we can safely assume than other people will not
make packages starting with the 'zope' prefix.
- The "core" of Zope (whatever that is) will be spread over several
top-level packages. People might consider this unaesthetic.
Having-found-my-own-idea-after-all-ly,
Philipp
More information about the Zope3-dev
mailing list