[Zope3-dev] Death to "Views" package.
Steve Alexander
steve@cat-box.net
Wed, 13 Nov 2002 18:42:11 +0000
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. :)
The name "Browser" implies "View" well enough for me. So, I don't see
the need for an intermediate Views directory.
Also, if I'm definiing Resources, I don't think I'd want to have:
Contact/Views/Browser/foo
Contact/Resources/Browser/bar
Better to have
Contact/Browser/foo
Contact/Browser/bar
> 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.
Keep the views separate from the content. This makes the tests separate
too. Tests of views are typically very different than tests of content.
Contact
Contact/tests
Contact/Browser
Contact/Browser/tests
Contact/FTP
Contact/FTP/tests
--
Steve Alexander