[Zope] - How do I publish this object?

Paul Everitt Paul@digicool.com
Tue, 8 Dec 1998 18:56:06 -0500


Skip wrote:
> My sentiments exactly.  It would appear that Principia and 
> Zope traded off
> Bobo's simple object publishing model for a very nice way to manage
> hierarchical web sites.  The extra complexity added under the 
> covers looks
> like it will make it very difficult to convert existing 
> CGI-based sites to
> Zope.  I have a site that uses 30-40 CGI scripts to do its 
> business.  At
> this stage, converting them looks like it will be fairly 
> difficult.  If I'm
> missing something, please fill me in.  If not, is there some 
> simpler way to
> publish objects through Zope other than the current Product API?

As mentioned by Amos, External Methods are a simple way to plug
functions into the object system.  You still, though, have to "add" the
External Method to the folder you want to bind them to.

Perhaps, though, there should be a slot for doing old-style Bobo
programming.  For instance, we could have a special top-level directory
called "/Bobo".  Anything modules placed in that directory can be
old-style Bobo applications, whose functions are automatically bound to
the top-level folder.

Thus, creating a module /Bobo/Skip.py:
=========================
"""Simple Hello World"""

def hello(self,name):
  """self is bound to top level folder"""
  return '<P>Hello, %s' % name
=========================

Automatically makes the URL /hello?name=Skip functional.

Perhaps the Control Panel could have a folder containing all imported
modules that lets you reload them.

OK some clever soul, give us some patches!

--Paul

Paul Everitt       Digital Creations
paul@digicool.com  540.371.6909