[Zope] Cutting, copying and pasting products

Paul Boddie paulb@infercor.no
Tue, 13 Jul 1999 16:05:09 +0200


Jim Fulton wrote:
> 
> Paul Boddie wrote:
> >
> (snip)
> > What I meant to ask was: could anyone give a rationale for why it
> > isn't possible to move product "instances" around?
> 
> I'm afraid I'm still not understanding you.
> You can copy and paste products.  But products can only live
> in the Products folder.

I understand that products are like software packages which are "installed"
somewhere central. But as products are Python classes I refer to product
instances as actual named Python objects in the object database.

> This restriction is due to the fact that Products are
> more like genetics than environment.  A product (currently)
> affects an entire site, not just a particular part of a site.
> 
> Having said that, I can imagine having products in the future
> that affect only part of a site.  Functionally, this would be
> useful, however, logistically, it is rather complicated.

To me, coming from the ZPublisher angle, I see that products are basically
classes which are instantiated and whose instances are then published at a
particular place in the object database namespace. My question attempted to
ascertain whether it is possible to get an object of such an origin and place it
elsewhere in the object database namespace, in the same way as it is possible to
pick up DTML Methods, files, and so on, and place them somewhere else in the
namespace.

[...]

> Products are about packinging and defining constructors.

Understood.

> Classes are about defining behavior.
> 
> When you want to package a bunch of things
> up or define how things get created, use a product.
> 
> When you want to define a new kind of thing, use a class.

This isn't tremendously clear to me really. I suppose I should consult the
relevant documentation and/or code.

Thanks,

Paul