RE: [Zope] Cutting, copying and pasting products
It is possible to move folder objects around, but products can supposedly only be cut, copied and pasted in the products directory. Could anyone give a rationale for this?
The Products Folder is a special object for, naturally, Products -- both disk-based (ala the primary built in Zope products, as well as any others) and Zope-based (Products that are instantiated using Factories). Remember that Zope Folders are not directories, but are actual objects, and some objects may act folder-ish but be very specialized and may only allow certain types of objects. (Similar to the Control Panel in Windows 9x, and /dev type directories on Unix). The Products Folder is one of these types of Objects. I believe the rationale was as a centralized product management area (letting you see what Products where installed with the system), and as a development area for through-the-web products.
Jeffrey Shell wrote:
It is possible to move folder objects around, but products can supposedly only be cut, copied and pasted in the products directory. Could anyone give a rationale for this?
Well, after being clear earlier in my mail I seem to have missed making my point. ;-) What I meant to ask was: could anyone give a rationale for why it isn't possible to move product "instances" around?
The Products Folder is a special object for, naturally, Products -- both disk-based (ala the primary built in Zope products, as well as any others) and Zope-based (Products that are instantiated using Factories). Remember that Zope Folders are not directories, but are actual objects, and some objects may act folder-ish but be very specialized and may only allow certain types of objects. (Similar to the Control Panel in Windows 9x, and /dev type directories on Unix). The Products Folder is one of these types of Objects.
I believe the rationale was as a centralized product management area (letting you see what Products where installed with the system), and as a development area for through-the-web products.
Understood. Given the recent ZClasses developments, is there an overview of how ZClasses differ from products and when the two technologies should be applied? Can ZClass instances be moved, by the way? Regards, Paul
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. 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. (snip)
Understood. Given the recent ZClasses developments, is there an overview of how ZClasses differ from products and when the two technologies should be applied?
Products are about packinging and defining constructors. 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. Jim -- Jim Fulton mailto:jim@digicool.com Python Powered! Technical Director (888) 344-4332 http://www.python.org Digital Creations http://www.digicool.com http://www.zope.org Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats.
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
participants (3)
-
Jeffrey Shell -
Jim Fulton -
Paul Boddie