Application settings, configuration, and preferences.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Recently we had a discussion about weather our code should be configured
using files or a DB back-end.  As this topic effects nearly every
development team I was wondering if there shouldn't be a common library
that deals with all of these issues.

We came to the conclusion that either should work, but our project must
work on systems that would not have an SQLDB installed.  There fore it
must be configured using files as supporting both would be a waste of
our development time.

Looking around for a solution I came across an extension to getopt that
read command line parameters from a file, essentially emulating "exec
$(cat);".  As this did allow configuration from either the command line
or a file it's a good start.  However we are specificually looking for
something that would accept configuration from a file or a DB, command
line options are not important.  Though a great solution would take
configuration from anywhere.

A full featured solution would also support containing user preferences
and administrative settings.  Allowing any of these to come from almost
anywhere.  Here is how an example deployment might work.  As this would
be a programming tool the user would be an administrator installing and
configuring the software.

Some configuration information contained in php should be extensible so
that all the configuration could be done there.  In this case settings
and user preferences would be read-only, configuration information is
always read-only.  This would usually specify a config file to be
located in the same folder or a subfolder.

This configuration file would have a default format that is configurable
in the php.  Would be one of PHP, XML, bind, apache, and several other
config file formats.  This file would contain information on where
settings and preferences could be written to, either another
configuration file some where in /var or connection information for a DB.

>From an application developers stand point this should all be as
difficult as getopt to setup, design decisions like what format the
config file is in should be left up to the admin installing the
software.  The developer need only be concerned with defining the values
stored, there type, and other properties.

Does anything like this exist?  This seams like an essential piece of
code that is re-invented for every project.

-- 
Mike Mestnik
Technical Team
___
Nagios Enterprises, INC.
Email:  mmestnik@xxxxxxxxxx
Web:    www.nagios.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux