[Zope3-dev] Last chance to mess with the source layout of Zope 3

Stephan Richter srichter at cosmos.phy.tufts.edu
Thu Feb 12 15:13:22 EST 2004


On Thursday 12 February 2004 15:02, Martijn Faassen wrote:
> Note that these packages can still grow an interfaces sub-package or
> browser sub-package when they become larger.

Yes, this is how I develop Zope 3 products these days. If the browser code is 
minimal and has only 1-2 templates I use browser.py otherwise I am shifting 
to a directory browser, but usually leave the views in __init__.py, so that 
the imports don't change.

Also, I have recently started to move implementation of interfaces to 
__init__.py as well. For example a simple content object like "File" would 
look like:

zope/products/file
  __init__.py --> File
  interfaces.py --> IFile
  browser.py --> FileEditView

Note how nice the imports are:

from zope.products.file import File
from zope.products.file.interfaces import IFile
from zope.products.file.browser import FileEditView

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training



More information about the Zope3-dev mailing list