Hi all,

Many thanks for previous help, I've decided to refactor my database and,
in doing so, my application but I'm not sure if I'm accessing the
database correctly.

I've got a custom web CMS written in Python running on ZODB (so does
everyone probably). It's a CGI so each request generates a new instance.
An instance connects to the database, renders the page then disconnects.
On a good day an entire page refresh is in the region of 35ms with
dynamic content.

At the moment, I pass the reference to the dbroot() around everywhere
and each instance binds self.dbroot to it so I can reach it from
anywhere. Is there a better way to reach the database dict from anywhere
within my code? I have a lot of small classes, dynamically called, which
need access to the internet (menu builder, tag list lookups etc).

Many thanks,

Adam Auckland

For more information about ZODB, see the ZODB Wiki:

ZODB-Dev mailing list  -  ZODB-Dev@zope.org

Reply via email to