[Zope3-dev] Meta Data (was Re: annotations/dc and component definitions)

Jim Fulton jim@zope.com
Sun, 11 May 2003 09:57:50 -0400


Garrett Smith wrote:

...

> I think the confusion stems from the fact that implementing
> IAttributeAnnotatable enables metadata for content. Without tracing down
> the linkages, this seems like a bit of magic.

Agreed.  And I can understand why some feel this is a wart.

I think that there is a tradeoff here.  In some ways it would be better
to make people explicitly say that they want Dublin Core (DC) meta data managed
for their objects.  It turns out, however, that pretty much *all* objects
want DC meta data.  If this is the case, then requiring objects to
say they want DC meta data becomes a significant burden.  It becomes a
"dead chicken" that all object authors must sacrifice. :)

For DC meta data, I'm pretty comfortable with assuming we should manage
DC meta data for annotatable objects.

...

> - What are the typical use cases for metadata within Zope 3? E.g.
> searching, categorization, table columns, etc. (Fleshing this out will
> highlight the role metadata is intended to play in Zope 3 -- from what I
> can see, it appears to play a primary role.)

I think you mean DC meta data. You are right that DC meta data is pretty central.

There are many other kinds of meta data (e.g. security grants).

Annotations are a general mechanism for meta data. DC meta data is only
one kinds of meta data.

> - How are metadata values determined? There seems to be two options: by
> the object or by something external to the object. Perhaps this is
> better described as metatada ownership.

Let's step back and define what we mean.

Data the object manages is regular data. Meta data is data about the object.
By (my) definition, if an object manages data, it isn't meta data, it's data.
(Allowing an __annotations__ attribute doesn't constitute management.)
If the implementation of an object refers to some data, the data is not meta
data.

There are cases where meta data is derived from regular data.  There are objects
for which an object's title is data.  In these cases, the DC title can be "derived"
from the title data.

Some objects are meta data themselves. In a library system, a catalog and it's
items are meta data. In an application like this, it's not surprising that attributes
we normally think of as meta data show up as data, since they are data of meta
objects.


> - How are metadata implemented? This could be nearly anything given the
> component arch, but what are the likely scenarios and under what
> circumstances would they be used?

Meta data will most often be implemented using annotations, since annotations
were invented for this purpose.

Jim