[Zope3-dev] Death to "Views" package.

Jim Fulton jim@zope.com
Wed, 13 Nov 2002 17:08:57 -0500


Jim Fulton wrote:
> 
> Early on, Stephan and I came up with the convention of putting views in
> view-type-specific subpackages within a "Views" subpackage. This means that
> most packages have a Views subpackage that has a Browser subpackage.
> While I still like the idea of separating Browser views into their own
> subpackage, I find the intermediate "Views" package to be unnecessary and
> quite annoying.
> 
> I'd like to make a papal edict that we stop creating "Views" packages and
> as time permits, start refactoring away our existing views directory (or 
> maybe
> have one refactoring that removes all of them). Before I make the edict, 
> however,
> I'd like to see if there are dissenting opinions. :)
> 
> At this point, it's worth asking whether it would be better to avoid the 
> veiw-specific
> subpackages altogether, although I still find them useful.
> 
> Thoughts?

One thing I've noticed is that most views are pretty simple. In cases where
the views are very simple, it might be best to put them in a single
module (e.g. FooBrowser.py, FooFTP.py, ...), in which case a separate
package isn't needed.

Of course, this only applies to views included in a  package. Third-party
add-on or replacement views would be in different modules, in  different
packages.

Hm, I think I think I like this option.

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