Containers in ZODB
Hi Zopists, I would like to use ZODB3 as an object DB to store my own objects. At the beginning, I will make any text UI but later I want to put my objects into a ZOPE Folder and store them inside ZOPE ZODB (Zope will serve as GUI). Generaly I have 2 types of objects: Container - object with some attributes and methods which can collect other objects (also Containers) Item - an object with some attributes and methods which can not collect any other objects but can be contained in Container My questions are: 1. Does anybody know what the essential Zope classes from which I have to inherit are? Of course I know the Persistent is essential for both of them but don't know whether it is sufficient for future import of my own ZODB as a part of Zope ZODB. 2. Does anybody know how to import my own ZODB (*.fs file) into Zope ZODB? I don't need to have any tabs in the web browser connected with my objects I only need possibility to store these objects inside Zope and call their methods. Please can anybody react on this it is very important to me, it is my project and I want to use ZODB. WBR, Petr -- Petr Knápek NEXTRA Czech Republic, s.r.o., Veveří 102, 659 10 Brno, Czech Republic e-mail: mailto:petr.knapek@nextra.cz tel:+420-5-41 558 394 FAX:+420-5-41 558 390 "Perl is worse than Python because people wanted it worse." Larry Wall, 14 Oct 1998
Petr Knapek wrote:
Container - object with some attributes and methods which can collect other objects (also Containers)
For these you should inherit from OFS.ObjectManager.ObjectManager.
Item - an object with some attributes and methods which can not collect any other objects but can be contained in Container
For these you should inherit from OFS.SimpleItem.Item. All you really need is to inherit from Persistent, if you're making your own objects, but inheriting from the above will allow you to use them later in an easier fashion. -- Itamar S.T. itamar@maxnm.com "It don't get thingier than that!"
Itamar Shtull-Trauring wrote:
Container - object with some attributes and methods which can collect other objects (also Containers)
For these you should inherit from OFS.ObjectManager.ObjectManager.
http://www.zope.org/Members/michel/Projects/Interfaces/ObjectManager defines the interface that ObjectManager realizes.
Item - an object with some attributes and methods which can not collect any other objects but can be contained in Container
For these you should inherit from OFS.SimpleItem.Item.
http://www.zope.org/Members/michel/Projects/Interfaces/ObjectManagerItem defines the interface that Item realizes. -- -Michel Pelletier http://www.zope.org/Members/michel/MyWiki Visit WikiCentral for the latest Zen: http://www.zope.org/Members/WikiCentral
participants (3)
-
Itamar Shtull-Trauring -
Michel Pelletier -
Petr Knapek