[Zope] Subclassing Folder

Dan Shafer pydan@danshafer.com
Sun, 02 Jun 2002 17:38:12 -0700


At 06:43 PM 6/2/2002 +0100, Peter Bengtsson wrote:


>>I want to create a new type of folder that, when created, brings some 
>>specific properties and contents along with it.
>
>A simple python product will do.

Is there such a thing? :-)

I just spent four hours with Chapter 3 of ZDG to learn how to create Python 
products for use in Zope. This makes Smalltalk look like a walk in the 
park! And I didn't even get as far as subclassing OFS.Folder.Folder or 
thinking about manage_afterAdd().

That chapter has so many typos and apparently out-dated information in it 
-- much of which has been noted in the file but not yet fixed, apparently 
-- that a newbie like me stands zero chance of understanding how to create 
a meaningful Zope product in Python.

Maybe I'm just allowing myself to be intimidated here, but I don't think 
so. It is starting to feel like Zope is object-oriented but buries its 
extensibility so deeply that either the process is too complex (as with 
Python products) or underexposed (as with ZClasses) so that really *using* 
its object orientation is daunting for all but the most intrepid and savvy 
of Pythonistas and Zopistas.

Obviously, at least some of you folks on this list grok how to do this 
object-oriented Web app development in Zope (which I thought was its main 
strength and is the sole reason I dove into it) but figuring it out has, 
for me, been a gradual process of tooth extraction without benefit of 
anesthetic. I'm on the edge of just giving up.

Zope appears to be very strong for building object-oriented dynamic Web 
*sites* but not for creating Web services or applications.

Am I wrong here? SOmeone please unlock this door for me if it can be 
unlocked. Alternatively, confirm my worst fears and I'll just find other 
ways to build these things I need to create.

>Just subclass it to OFS.Folder.Folder and stick in your manage_afterAdd()
>(when using manage_afterAdd(), note a previous list email about using this 
>for ZPT by me)
>
>
>>I presume I will want to use a ZClass for this, but given all the 
>>warnings I've received about their relative fragility, I wanted to check 
>>with the list to be sure I'm not either overlooking a better solution or 
>>acting in ignorance of a packaged solution.
>
>ZClasses are suitable for less serious classes.
>Try to go for python product first and foremost if you can.
>
>Peter
>
>
>
>>_______________________________________________
>>Zope maillist  -  Zope@zope.org
>>http://lists.zope.org/mailman/listinfo/zope
>>**   No cross posts or HTML encoding!  **
>>(Related lists - http://lists.zope.org/mailman/listinfo/zope-announce
>>http://lists.zope.org/mailman/listinfo/zope-dev )
>>
>>
>>
>>
>>---
>>Incoming mail is certified Virus Free.
>>Checked by AVG anti-virus system (http://www.grisoft.com).
>>Version: 6.0.361 / Virus Database: 199 - Release Date: 2002-05-07
>
>
>
>---
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.361 / Virus Database: 199 - Release Date: 2002-05-07