[Zope3-dev] Death to "Views" package.
Jim Fulton
jim@zope.com
Fri, 15 Nov 2002 14:02:46 -0500
OK, here's my conclusion. :)
We'll stop creating Views packages. I'll try to find a good time before the speint
to to a mass refactoring to get rid of the one's we have.
I suggest that if the code for all of the presentation components of a given type
is small, then people should just create modules. If there is too much code to
manage cleanly in a single module, then create a package for the views of a given
type. For example, if a package provides a single content type and there is a modest
amount of browser presentation code, then put the code in a Browser module (Browser.py).
If a package provides multiple types or, for some reason a lot of code is needed, then
create a Browser subpackage with modules for the various views.
Jim
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?
>
> 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