Re: [Zope] Prototyped folders?

2000-06-28 Thread Hamish Lawson

I wrote:

 If a folder doesn't itself contain a required object or method, I'd
 like to have another folder looked in instead. The fall-back folder
 won't necessarily (and often can't) be higher in the hierarchy, so
 acquisition doesn't seem to be a solution. 

Jeff Hoffman wrote:

 I assume your aim is to create a 'baseline' site with a number of 
 customized copies. If you change the baseline, the changes are 
 reflected in its instances, unless the instance has overloaded the 
 changed aspect.

Exactly so.

 I would be interested in pursuing and contributing to an effort to do
 the Hard Thinking this will require, done correctly.

That would be great! Have you seen Steve Alexander's reply to my post?
I'm relatively new to Zope development (though with a fair amount of
experience in Python), so I'd welcome the insights that others more
experienced than me would bring.

Hamish Lawson
University of St Andrews, Scotland




Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Prototyped folders?

2000-06-27 Thread Jeff Hoffman

On Tue, 27 Jun 2000, [iso-8859-1] Hamish Lawson wrote:

 If a folder doesn't itself contain a required object or method, I'd
 like to have another folder looked in instead. The fall-back folder
 won't necessarily (and often can't) be higher in the hierarchy, so
 acquisition doesn't seem to be a solution. 

We do something very similar with our customers, and are in the process of
figuring out the best way to do this kind of thing in Zope. I assume your
aim is to create a 'baseline' site with a number of customized copies. If
you change the baseline, the changes are reflected in its instances,
unless the instance has overloaded the changed aspect.

We have a site (actually 109), built on our proprietary middleware that
do exactly this (check out http://www.pgdc.net).

 Inheritance from a folderish class seems to be one solution, but I fear
 this might lead to an explosion of classes.

Indeed, I believe the same.

 The answer I think I need is to have a protoype mechanism (similar to
 that used in JavaScript and Self). A folder with the requirement to have
 its missing methods looked for elsewhere would be created as an instance
 of (say) PrototypedFolder with a pointer to the folder it wanted to use
 as a prototype. Does such a mechanism exist for Zope?

I achieved something similar to this by using a ZClass mix-in. My mix-in
basically overloaded ObjectManager._checkId to allow me to overload
aspects of a ZClass on an instance-by-instance basis. If the instance did
not overload the method, Zope would fall back to the ZClass's method
definition.

Unfortunately, my attention has been focused elsewhere, lately, and I
haven't had time to flesh this idea out. Getting this to work isn't the
hard part. Getting it to work well, in a way that allows web developers to
(easily) visualize what's going on is, unfortunately, much harder.

I would be interested in pursuing and contributing to an effort to do the
Hard Thinking this will require, done correctly.

 Hamish Lawson
 University of St Andrews, Scotland

--Jeff

---
Jeff K. Hoffman   704.849.0731 x108
Chief Technology Officer  mailto:[EMAIL PROTECTED]
Going Virtual, L.L.C. http://www.goingv.com/


___
Zope maillist  -  [EMAIL PROTECTED]
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 )