[Zope] Folder properties...

Michel Pelletier michel@digicool.com
Mon, 08 Nov 1999 15:11:17 -0500


Ramiro Brito Willmersdorf wrote:
> 
> Hi,
> 
> I have a simple question regarding folder properties.
> 
> Do properties behave as static class variables (in Java) or
> each client gets his own copy?
> 
> At first I didn't think about it (implicitly assuming the latter.)
> Then I realize I might be doing a *very* serious mistake, ie, a
> site that could only be accessed by one user at time :)
> I tried to test it, and it seemed to confirm my original assumption
> (properties are like instance variables, each client gets his own.)
> Sadly I don't know Zope enough to trust my testing, so
> I'm asking just to make real sure.
> 
> I think that what I'm asking, in other words, is if it is ok to
> store information about client request in folder properties, rather
> than on request variables.

It's Ok, but it won't do what your looking for.  As soon as one clients
transaction ends, the changes made to the property will be written to
the database, and all subsequent transactions, regardless of the client
accessing them, will get the new value.

What your asking for is a Session.  Because HTTP is a stateless,
sessionless protocol, you must use some sort of server side logic to
maintain state between requests.  Zope properties do not do this.  There
is a Session product on the Zope site.

-Michel