Wednesday, November 16, 2005

Representative Elements

It should be possible to have a concept of representative elements in a static Association (i.e., an Association without a dynamic predicate). This would allow for a bunch of photos selected of a bike tour to have just one photo be the representative element for the association. One way to implement this would be to have each Photo have a Representative field, which points to the actual representative photo. Of course, then photos can be part of only one representable set. Perhaps the representative should be stored with the Association. So you ask an Item for an Association that it's part of, and then ask the Association for the representative element. If there is no representative element, just show all elements.

Again, representative elements should only be valid for static associations. If it were a dynamic Association and an element E were picked, if E's state changed so that it was no longer part of the Association, what would that mean? We would have an Association whose representative element was not part of the Association. Maybe this should be allowed, but it seems kind of dumb (e.g., why have a 10 day old e-mail be representative of the Association "All e-mails less than 7 days old"?)

As an alternative, perhaps we should meet in the middle and only allow static members of Associations to be representative. That is, when the person wants to make the member of an Association the representative, its inclusion in the Association had to be satisfied by a static part of the predicate (e.g., a particular UID) and not a dynamic part (e.g., age <>

No comments: