[Zope3-dev] Re: Creating initial services

Jim Fulton jim@ZOPE.COM
Wed, 11 Dec 2002 03:54:44 -0500


Guido van Rossum wrote:
> Hi Jim and Steve,
> 
> I'd like to write the code for setting up initial services. 

OK

 > I found a
> spot in SiteDefinition.py where a new site is initialized
> (_initDB()), and I think I could add some code to create an event
> service and an object hub. 

I'm not very happy with the StartUp package. In part, this is because
I want to separate system setup from process setup. This is important when you
want to access a system from Python code without running any servers. I've started
to do this. For example, a while ago, I created Zope.App._app to collect a number
of facilities for configuring Zope, opening and setting up the database, and
getting to root objects and debugging facilities from a Python prompt. These are exposed
in Zope.App.config and Zope.App.Application.

I'd like additional root object setup to be put in Zope.App._app.database
and I'd like Zope.App.Startup.SiteDefinition.SiteDefinition._initDB
to be refactored to use Zope.App._app.database.

 > But it occurs to me that we should
> probably do this from a suitable zcml file. 

I think that would be a good todo. I don't think we need to do this
right away though.

Jim

-- 
Jim Fulton           mailto:jim@zope.com       Python Powered!
CTO                  (888) 344-4332            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org