[Zope3-dev] Separate package trees for presentation and interfaces
Casey Duncan
casey@zope.com
Sun, 15 Dec 2002 15:51:14 -0500
On Saturday 14 December 2002 09:29 am, Jim Fulton wrote:
[snip]
> Some notes:
>=20
> - There should be a separate tree for each presentation type
> (e.g. "browser", "ftp", "xmlrpc")
Yup, I think this will finally solve the folder explosion problem without=
too=20
many drawbacks.
=20
> - This proposal and the package organization that Martijn proposed
> should apply on a project by project basis. Browser presentation
> software included in the Zope core should be under zope.app.browse=
r,
> but other Zope 3 projects or products should have their own=20
hierarchies.
That means we need to have a clear explanation of what constitutes a=20
"project". I'm not sure it's clear to me right now...
=20
[snip]
> View code should only depend on interfaces, not on implementation. View=
=20
developers
> shouldn't have to refer to or search through the application implementa=
tion=20
code,
> because they depend soley on interfaces. Given this, it makes sense to=
=20
separate the
> interface code from the implementation code as well. Otherwise, view=20
developers
> will *still* have to navigate and understand the implementation hierarc=
hy to
> find the interfaces that they depend on.
Yup I agree. I think this is actually a minor "eureka", because it means =
we=20
are realizing real physical separation of interfaces and implementation. =
That=20
could make it *much* eaiser in practical terms to have multiple=20
implementations to choose from for the same set of interfaces without hav=
ing=20
to have multiple copies of the interfaces themselves which must be kept i=
n=20
sync. Cool.
Not to mention the fact that it makes it a more deliberate choice to look=
at=20
implementation since its in a separate place.
One question: How does this affect the earlier decision to merge interfac=
es=20
into one file? Does it?
=20
> Another problem with including interfaces in the implementation hierarc=
hy is
> that it leads to either overly large and incohesive interface files or =
to
> multi-word file names, like "iview.py" or "viewinterfaces.py". For exa=
mple,=20
this
[snip]
Fewer similarly named files in one place =3D=3D better understanding IMO
[snip]
> So, unless someone convices me otherwise, we'll move forward with separ=
ate=20
presentation
> and interface hierarchies.
+1 from me.
-Casey