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

Andreas Jung lists at zopyx.com
Thu Apr 10 23:07:56 EDT 2008



--On 10. April 2008 21:29:43 +0200 Brian Sutherland 
<brian at vanguardistas.net> wrote:

> On Thu, Apr 10, 2008 at 07:31:54PM +0200, Andreas Jung wrote:
>>
>>
>> --On 10. April 2008 19:10:49 +0200 Brian Sutherland
>> <brian at vanguardistas.net> wrote:
>>
>>
>>>
>>> Just adding my few requirements:
>>>     - Integration into the component architecture in such a way that I
>>>       can specify the db connection parameters in ZCML and that database
>>>       reflection still works. I want to be able to get a handle on
>>> SQLAlchemy       things by calling getUtility.
>>
>> Please *NO* database specific configurations within ZCML. We're running
>> applications in up three or four different environments and I don't want
>> to  maintain instance specific configurations within ZCML. Either we pass
>> such informations through environment variables or the database
>> connections  parameters are read from a configuration within the
>> instance configuration.
>
> 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.

Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20080411/809da6d8/attachment.bin


More information about the Zope-Dev mailing list