• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 25. Building and Storing Annotat... > Implementing an Alternative Annotati...

Implementing an Alternative Annotations Mechanism

Let's say you cannot store annotations in an attribute on the object because the object is volatile. Where could you store the annotation data in that case? One possibility would be to use relational databases (RDBs), which makes sense if your object's data is also stored in an RDB. A derivative of this solution would be to use files; but that is hard to get working with transactions.

You also have to bear in mind that Zope uses annotations to store metadata such as Dublin Core metadata or workflow data. It would be hard to store that data in an RDB. So the ZODB is still a good place to store the annotation data. One way would be to develop some sort of annotations container that lives in the ZODB. But it would be even better if the annotations could store their data to a nearby object that implements IAttributeAnnotable. This would allow almost any persistent object in the ZODB to serve as an annotation keeper.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint