[Web-SIG] more comments on Paste Deploy

Jim Fulton jim at zope.com
Wed Mar 7 11:37:35 CET 2007

On Mar 5, 2007, at 5:23 PM, Joseph Tate wrote:

> On Monday 05 March 2007 16:19:14 Ian Bicking wrote:
>> Joseph Tate wrote:
>>> I find that multiple files gives you a nice way to override  
>>> defaults.  As
>>> long as the files are read in a way that's predictable and  
>>> documentable,
>>> and ultimately appear as if read from a single file (and possible
>>> displayable via some diagnostics link in an application).
>> Allowing this sort of thing means that the application carries  
>> around a
>> complete config object of some sort, which I rather dislike -- it  
>> allows
>> for smart applications, but it makes it much harder to understand the
>> configuration and any possible side effects.  If we resolve the
>> configuration down to something more limited (as the Paste Deploy  
>> entry
>> points do) you can't really reconstruct the config from there.
>> *Something* could still reconstruct the config (an alternate config
>> loader, via logs, via debug settings, etc), just not the application
>> itself.
>> This is somewhat problematic for applications that have particularly
>> complex config requirements, or want to support self- 
>> configuration.  The
>> best solution that I can think of with Paste Deploy in that case  
>> is to
>> just use the Paste Deploy configuration to point to the "real"
>> configuration.
> I agree.  That's why my app has a /config link that spits out the  
> "effective"
> configuration.  The overridden config is a hard requirement, I'd  
> love to hear
> alternative solutions.  /etc/php.d, /etc/httpd/conf.d and that ilk  
> come to
> mind as examples of this kind of thing.

FWIW, zc.buildout has a configuration model designed to support  
overriding.  Often there is a base configuration that is overridden  
by specific configurations for development and deployment.  It  
leverages the beautifully simple model of a dictionary of  
dictionaries provided by ConfigParser.


Jim Fulton			mailto:jim at zope.com		Python Powered!
CTO 				(540) 361-1714			http://www.python.org
Zope Corporation	http://www.zope.com		http://www.zope.org

More information about the Web-SIG mailing list