[Zope3-dev] Meta Data

Garrett Smith garrett@mojave-corp.com
Mon, 19 May 2003 09:39:04 -0500


Jim Fulton 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.
>=20
> Agreed.  And I can understand why some feel this is a wart.

Personally, I don't think developers are going to sweat this.
=20
> 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.

This is what I would expect. But I think the current content
implementations will lead developers down the road for using metadata
when they should use data. E.g. the news item implementation -- title,
description, etc. are implemented using metadata when I think, per your
standards, they should be implemented using data. (Not a critique, just
trying to flush out a key design issue.)

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

How would you handle the DC metadata 'title' element for a book, which
clearly has a title data element that it will manage? I would expect
that changing the metadata title value would also update the book title
property, and vise versa.

This pattern could be applied to news item as a model, unless I'm
smoking something here.

And one more, slightly more esoteric example/question: What about
something like "Person" content where the DC 'title' element might be a
function of the person's first and last name, e.g. "Mr. Jim Fulton".
Here it seems like we may be dealing with a read-only DC 'title'.

 -- Garrett