[Zope-dev] Re: straighting out the SQLAlchemy integration mess

Brian Sutherland brian at vanguardistas.net
Fri Apr 11 04:09:16 EDT 2008


On Fri, Apr 11, 2008 at 05:07:56AM +0200, Andreas Jung wrote:
> --On 10. April 2008 21:29:43 +0200 Brian Sutherland 
> <brian at vanguardistas.net> wrote:
>> What defines if something is the instance configuration?
>>
>> Isn't ZCML just another format of configuration file? I agree it's evil
>> to hardcode database connections in the application as they must be
>> under the control of the sysadmin. But that doesn't preclude them from
>> being expressed in zcml.
>
> The point is: we don't need yet another configuration language for the 
> configuration of a site. ZCML should be used for the purpose it has been 
> intended for: for the configuration of the components of your site (easily 
> spoken). This kind of configuration is static if you setup a site for 
> project X. But settings like ports, paths etc. often differ between dev, 
> test and production environments.
> 
> We already have ZConfig as standard cofniguration language for instance 
> specific configuration aspects. In addition: we often do use environment 
> variables and .ini files for additional configurations. Introducing another 
> configuration language is stupid. Especially because system administrators 
> or co-workers know little or nothing about ZCML. This is an unnecessary 
> introduction of complexity. Setting an environment variable with a DSN is 
> much easier then having to fiddle around with ZCML and XML...totally 
> unnecessary overhead....keep it simple ...using ZCML in this configuration 
> context is only for XML masochists.

Unfortunately, it doesn't seem an option, right now, to avoid using ZCML
to setup database connections. So I'm not sure how you want to implement
your ideas?

In general, I think if you want your configuration expressed in ZConfig
and available as a utility, you have a problem.

I'm not sure of:
    * How do I register a utility in ZConfig?
    * How will the above registration work properly in functional tests
      (especially with tearing down and setting up layers)?

-- 
Brian Sutherland


More information about the Zope-Dev mailing list