On Wednesday 13 April 2005 10:31, Andreas Jung wrote:
> I am currently working on TextIndexNG V3 with the goal to have its
> functionality available
> for Zope 2 and Zope 3 (means a common code base). Are there recommendations
> or experiences
> how to structure code and test? E.g. at the moment everything lives under
> Unittest scripts perform imports from Products.TextIndexNG3...which is fine
> for Zope 2
> but properly not for Zope 3. So what the best way to deal with common code
> on both platforms?
I knew this would happen some day, and I have thought for a long time about it
already. :-) I think the trick would be to write code for Zope 3 and put it
in a top-level package, like "textindexng". Inside this package you add a
package "TextIndexNG" that is expected to be added to Zope 2's
So the tricky part is to not run the tests in "textindexng/TextIndexNG" when
testing from Zope 3's test runner. I could work with you on some testing
support for this.
So in effect, in Zope 3 you would have:
+-- TextIndexNG (not used or even distributed)
In Zope 2:
I think this would be a usable pattern; what do you think?
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
Zope3-users mailing list