On Mon, Feb 22, 1999 at 09:48:19AM -0500, Noel Rappin wrote:
I read the Technical Introduction to Object Publishing, and it says that objects within published modules can be referred to as URL's. Very cool. However, I don't think that it says how to publish modules to the server in the first place -- the Zope manager will let me use External methods, but it sounds like publishing a module is different. Do I have to use the Product API for this -- if so, than the Technical Introduction document is somewhat misleading? If not, than what is the advantage of using the product API?
Ah, here's the rub... the TITOP (last I checked) was really about the ZPublisher aspect (the object-publisher-formally-known-as-Bobo) which is but a small part of the Zope framework. You can use it by yourself. What Zope does is create objects to be published and store them in a object database. The objects are Folders, (in 1.9)Documents, Files, Images, etc... they all know how to "publish themselves" naturally when the ZPublisher runs through the database. If you want to JUST publish a full-up custom module, use ZPublisher by itself (You can look at the Main.py file for what is necessary in some ways), but if you want ot "attach" it to an existing Zope system (basically graft it onto the tree), that is going to really require a Product I think... a Product isn't that hard, Amos wrote a good introduction, it just has some interesting base requirements that have ot be implemented.
Second, is there a way to refer to sub-objects if the exact name is not known. For example, let's say I'm trying to write a threaded discussion forum. Each message has a sub-object that is a list of reply posts. Is there a way that I can use a URL to call a method on a specific reply post directly, or do I need some kind of proxy object to mediate the call?
I'm not sure what you mean... http://blah/Discussion/threadA/replies is the idea? I would use a method on the ThreadA object to return a list of replies, not a subobject... but that's me. Remember the last little piece is a method on an object (either a default method if ommitted or an explicit one). Chris -- | Christopher Petrilli | petrilli@amber.org