> > Ah, I see. 
> > But why do I need SimpleItems, isn't PropertyManagers sufficient?
> 
> It makes your class play nicely with Zope.
> 
> So, it can work with DAV, be copied and pasted, properly work
> with traversal, work with ZDOM, be Owned, support undo, work
> with Acquisition, and manage roles.

Which isn't a bad thing.
At the moment I'm aiming at the lest amount of functionality.

Next thing I want to do is adding Zope-awareness and put
objects in a Folder/wCustomizer .
How hard is it to move a Simple Item DataSkin to a Customizer?

BTW. After I have done that successfully I intend to make the DataSkins
Plugins instead of Zope Items. That's the my goal at this point.

 
> Take a look at the source to lib/python/OFS/SimpleItem.py

> You can omit some of this if you know for sure in advance that you
> will be using instances of your class only with Specialists in 
> Racks.
> 
> However, ZPatterns is set up so you can use the same DataSkin class
> with instances stored in a Rack or stored as normal Persistent objects
> in the ZODB.
> 
> 
> >> In your case, I suggest making your class Persistent, and using
> >> PropertyManager properties.
> >
> > But making it presistent doesn't that lock the objects to be stored in the ZODB?
> > I may want to change storage to SQL later.
> 
> No it doesn't tie the object to the ZODB if you're using a Specialist.
> That's the magic of ZPatterns.

Ahhh, good.
Magic is a wonderful thing, but it also makes understanding a bit harder ;-)


About the ZClass still of propertysheets, is that when I add a 
OFS.PropertySheets.PropertySheets attribute to my object?
Can I use the OFS.PropertySheets.PropertySheets for that and
does it play with ZPatterns?

I use PropertySheets for allot of multi language support, storing
properties in separate languages PropertySheets.

Johanc


_______________________________________________
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to