newbie: publishing/product relationship?
Following one of the howto's (September Update 2000 update of the Python Product ...", I've created an object which I think is "publishable". The article says it is but doesn't say how to do so (ie publish it). Instead it goes on to explain how you turn it into a "product", so to be managed by the Zope management interface. It seems that a "product" allows you to define a generic such product which the management interface allows others to create instances of. The example has one entering id, title, questions, etc. Is this a fair statement? In my case I don't want that property since the only instances I wish to admit will be ones defined in a (private) database. If you like, I'm seeking an RPC mechanism and wish to invoke methods on such instances only. Is "creating a product" what I really want to do, or can I stop short at at "publishing"? In the publish only case, what form of URL would people use to get at those methods? Admittedly one method will be a "create/add" but that is to create another entry in my private, non-Zope "database". Perhaps an [substitute favourite commercial database]-SQL type example might be similar if there is an example to refer to? -- Peter J. MASON, Principal Software Engineer Retriever Communications Pty Ltd Ph: +61-2-9006 8600 Fax: +61-2-9006 8605 Email: peter.mason@retriever.com.au Web: www.retriever.com.au
Hi Peter, You're correct on all counts. One thing that helps get your head around Zope is that it's basically a big running process that happens to save all of its state when it gets shut down and brought back up. Object instances are publishable when instances of their class are created in the ZODB, when they have the proper mixins and security metadata, and they've registered themselves with the Zope OFS (object file system) machinery. All "basic" Zope objects do this (instances of DTML methods, etc.) To prevent your Zope objects from being instantiated by just anyone, you can set security properties in the Product to limit the scope of users who may create new instances of classes in the product by protecting the class' constructor with a permission. Subsequently deny that permission to all classes of users whom you don't want to instantiate the object. You really probably do want to eventually create a Product, AFAICT. In the meantime, however, to get going quickly, you can create a set of PythonScripts or External Methods in "instance space" (via the through-the-web interface) that prototype your application, and then move to a Product-based architecture (somewhat painfully) later. HTH! - C ----- Original Message ----- From: "Peter J. MASON" <peter.mason@retriever.com.au> To: <zope@zope.org> Sent: Friday, March 23, 2001 12:28 AM Subject: [Zope] newbie: publishing/product relationship?
Following one of the howto's (September Update 2000 update of the Python Product ...", I've created an object which I think is "publishable". The article says it is but doesn't say how to do so (ie publish it). Instead it goes on to explain how you turn it into a "product", so to be managed by the Zope management interface.
It seems that a "product" allows you to define a generic such product which the management interface allows others to create instances of. The example has one entering id, title, questions, etc. Is this a fair statement? In my case I don't want that property since the only instances I wish to admit will be ones defined in a (private) database. If you like, I'm seeking an RPC mechanism and wish to invoke methods on such instances only. Is "creating a product" what I really want to do, or can I stop short at at "publishing"? In the publish only case, what form of URL would people use to get at those methods? Admittedly one method will be a "create/add" but that is to create another entry in my private, non-Zope "database".
Perhaps an [substitute favourite commercial database]-SQL type example might be similar if there is an example to refer to?
-- Peter J. MASON, Principal Software Engineer Retriever Communications Pty Ltd Ph: +61-2-9006 8600 Fax: +61-2-9006 8605 Email: peter.mason@retriever.com.au Web: www.retriever.com.au
_______________________________________________ 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 )
participants (2)
-
Chris McDonough -
Peter J. MASON