[z3-five] Restructuring
Lennart Regebro
regebro at gmail.com
Tue Apr 19 00:00:17 MEST 2005
On 4/18/05, Philipp von Weitershausen <philipp at weitershausen.de> wrote:
> Hello all,
>
> as I've mentioned a couple of times, I've been planning to restructure
> some Five code. The reason is that we will want to add more Zope 3
> features to Five (for example, for the mid-term I want to add i18n and
> l10n capabilities) and the code structure (especially the test
> structure) is getting out of hand.
>
> In Zope 3, there's a package hierarchy convention that is not too flat
> to provide no structure whatsoever and not too deep to find yourself
> lost in. Most importantly, tests are included along with every package
> and can therefore be much more easily be associated with the module or
> class they actually test. Right now, with a big blobbish FiveTest
> product, this is almost never the case in Five. Also, Zope 3 has
> embraced doctests enourmously in recent times and I think they add a lot
> to the implicit code documentation because they almost force one to tell
> a story along the test. Also, doctests as inline docstring are probably
> the closest you can get in test-to-implementation association...
>
> So, the objective can be summed up:
>
> * restructure Five into a more Zope3-like package hierarchy (this will
> most likely result in 'browser' and 'skin' subpackages, possibly also
> 'traversing'; these names correspond to Zope 3 naming conventions).
>
> * restructure tests to be more atomic and more doctest-like, thus easier
> to read, understand and modify.
>
> I'll obviously be creating a branch for this. I don't believe in
> branches that live too long, though, so I'd like to come to the point
> where a certain state of satisfactory restructuring is reached and
> everbody is ok with it pretty soon.
I'm extremely OK with it, as i have long found the current structure a
hindrance.
I'll even be so bold as to suggest that the Five-hierarchy mimics the
zope3 hierarchy, so that th Five implementations for directives
defined in zope.app.form are located in Five.app.form. :-) or, at
least, Five.form.
--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
More information about the z3-five
mailing list