[Zope3-dev] Re: Creating initial services

Jim Fulton jim@zope.com
Thu, 12 Dec 2002 03:03:06 -0500


Guido van Rossum wrote:
> [me]
> 
>>>I'd like to write the code for setting up initial services. 
>>>
> 
> [Jim]
> 
>>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've done this now, in a hardcoded way.  When you start with an empty
> Data.fs, an Events service and an ObjectHub service are created and
> activated in the root folder.  It feels like an improvement already.
> And it should be easy to add other services as the need arises.

Another one to do while it's fresh in your mind :)
if the error reporting service.

>>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.
>>
> 
> OK, will do.

Thanks.


> 
>>>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.
>>
> 
> Sure.  I also hear that the SiteDefinition should return a list of
> directives instead of executing directives as it goes -- would that be
> a good exercise?

I'd like to switch this part of the configuration to use zconfig, rather
than zcml, so cleaning this up is probably not worth the bother at this point.

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