[Zope-dev] crazy idea?
Huayin Wang
wang@rjka.com
Fri, 16 Feb 2001 08:35:01 -0600 (CST)
Imagine this:
1) for every zope objects we implement a generic handler called "deploy",
which return true or false.
2) we then plug in a little check in zope's acquisition process to
first call the handler of the objects in the acquisition hierarchy,
if true, use that object. Otherwise, keep going down the acquisition
tree.
of course, there can be an option indicating whether the rendered results
for objects whose deploy method return false should be collected and used.
3) an easy implementation could be:
define an attribute "_deploy" for every object, default to true.
define a zope object "deploy" which is the default, when invoked as an
object's method, just return the "_deploy" attribute of the object.
the deploy method can be overridden with user provided method.
4) the "-deploy" attribute can be turned on or off through the web management
interface. treat them as just the same as other attribute.
I think this little device can be used to turn an object on or off easily,
and if you think about the fact that it can be changed dynamically, the
possibility is endless.
comments?