[Zope3-dev] Re: Moving dublincore and annotation from zope.app to zope

Philipp von Weitershausen philipp at weitershausen.de
Mon Jun 28 02:13:07 EDT 2004


Christian Heimes wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> At Europython there where some discussions about moving some useful
> packages from zope.app to zope. IMO dublincore and annotation are two
> good candidates.
> 
> zope.app.dublincore does only depend on annotation from zope.app and
> annotation does only depend on the ILocation interface from
> zope.app.location. There is even only one place where the ILocation
> interface is used:
> 
> class AttributeAnnotations:
> 
> ~    def __setitem__(self, key, value):
> ~        """See zope.app.annotation.interfaces.IAnnotations"""
> ~        if ILocation.providedBy(value):
> ~            value.__parent__ = self.unwrapped_obj
> 
> ~        try:
> ~            annotations = self.unwrapped_obj.__annotations__
> ~        except AttributeError:
> ~            annotations = self.unwrapped_obj.__annotations__ = OOBTree()
> 
> ~        annotations[key] = value
> 
> 
> The two packages could be very useful for Five, too. *wink to Martjin* :)

Well, I don't think they are useful for Five per se, but they would 
probably be extremely useful for packages implemented or converted atop 
of Five. I could imagine Silva Five or Plone Five using annotations and 
zope.app.dublincore for metadata instead of DefaultDublinCoreImpl.

We have, btw, changed our minds about zope.app dependencies in Five. We 
were not going to require zope.app, but we ended up duplicating a 
tremendous amount of code. We now have a few well-defined dependencies, 
such as on zope.app.component, which is perfectly okay, IMO.

I would agree that zope.app.annotations would be a package that other 
non-Zope apps could make use of; maybe its dependency on ILocation can 
be factored out. As for zope.app.dublincore, I'm not sure whether it's 
not a bit too application server specific; but then again, twisted et. 
al. could make use of it too.

> apidoc and introspector are useful to create api documentation and
> interface introspection on the fly that could be used in other large
> projects - including Five based Zope2 products.

Problem is that they're quite zope.app specific; which, again, wouldn't 
be a reason not to use them in Five...

> zope.app.schema* packages would be *very* handy in zope2. Maybe
> Archetype's widget system could be replaced by zope.schema and schemagen
> in the future ... .oO( I have a dream :)

I guess we all have our dreams :). Like Stephan said, zope.app.schema is 
not nearly ready yet. I'd talk to Sidnei about making that work again. 
And then still, zope.app.schema is pretty zope.app-specific.

Philipp



More information about the Zope3-dev mailing list