[Zope3-dev] Package organization quandry

Jim Fulton jim@zope.com
Wed, 15 May 2002 15:02:57 -0400


I'm trying to finish up some work to:

- Refactor and abstract traversal APIs,

- Provide namespace traversal in ZPT path expressions, and

- Tie ZPT module and Python expressions in with security to use
  restricted import and builtins.

Now, here's my problem which has me a bit stuck.

The Zope package is a pure container package.  It has a top-level App
package that has subpackages for software that is only useful for
the Zope Application server. Other top-level packages in Zope are 
supposed to be useful outside the Zope application server. For example, 
we think that the component architecture and the configuration system would
be useful elsewhere so we made them top-level packages (within Zope).

I've gotten strong input  that there should be as little
software in App as possible, Most of the software we build should be usable
elsewhere. I have a lot of sympathy for this point of view. :)

My fear is that we'll end up with top-level packages in Zope that have too
many interdependencies and aren't useful without each other.

Here's an example.

  The TAL package provides the core ZPT machinery, with a tal/metal compiler
  and interpreter. It doesn't really depend on any other Zope packages.

  The PageTemplate package wants to provide Zope Page Template support and 
  page-template support for non-Zope python applications.  It has dependencies
  on a number (8) of other Zope packages, although none of these are in App.
  Some of these dependencies, like Zope.Exceptions, seem innocent.
  A dependency on TAL is inevitable.  Many of these dependencies are needed by
  the Zope application server, even though the dependencies are not on the App
  subpackages. I've pondered moving the flavor of page templates that have
  dependencies on things like security, the comnponent architecture, and traversal
  down into App, but these could, theoretically, be useful outside of the application
  server. Of course, the application server boundary for Zope 3 is not crisp.

There's a tradeoff between moving things out of App to encourage their use outside
of the Zope application server and keeping the dependencies between things outside of
App to a minimum.

Thoughts?

Jim


--
Jim Fulton           mailto:jim@zope.com       Python Powered!        
CTO                  (888) 344-4332            http://www.python.org  
Zope Corporation     http://www.zope.com       http://www.zope.org