Re: Conf: argue !

"Wim Niemans ri" <[email protected]>
Newsgroups gmane.comp.lib.binarycloud.devel
Organization Pb Solo
Message-ID <421E7D7F.16452.2DF0E15@localhost>
On 23 Feb 2005 at 0:28, Manuel Holtgrewe wrote:

> Jean-Christophe Michel schrieb:
> > Manuel Holtgrewe wrote:
> > 
> >>  - Factory defaults are always read from the module's directory in the 
> >>  - We force the user to have a binarycloud.conf.xml file that contains 
> >> basic configuration for the framework and a Datasources.conf.xml 
> >> because otherwise he might run into problems with getting the 
> >> configuration.

I really would like to see an okay on this. Complete with naming of the 
location in the BC_tree of 'binarycloud.conf.whatever'.

> >>  - The user might *either* store a given domain in a conf.xml file 
> >> *or* in a database. That should stop a lot of problematic points I see 
> >> with wild mixture.

Yes.

> > I'd propose to be simpler: xml conf would be used _only_ for default 
> > conf files stored in packages (core or vortex). Xml would be loaded into 
> >  db via the web interface vortex/confadmin.

Naturally. I call that an Install option.

> > All dev values would go into db. Eventually user prefs would go into db 
> > using the same schema.

User prefs are per user. I see here a whole different story:

Every user has preferences; eg can personalize the website in some extent.
But users are lazy and user 'anonymous' even doen't care.
So you do have for every user default settings if their preferences are 
not set properly.
I do call that default a conf_value in domain:user.
That default might be overriden by Class user:: using: 
myConf->set(path,value).

> I like the idea of "core settings cannot be changed on the fly"... And 
> what about people who do not have a database?

From previous posts:

I didn't mean a db_less conf, but a db_less binarycloud.
The conf class, as it is right now, uses files. That's already db_less.
Perm and Node uses the db. I've been looking around but cannot determine a
nice method to cut off the db. But there must be a way to set the user to
be anonymous and its role too.

<snip>

Sure, having role.anonymous shouldn't require a db.
But using roles without db would be quite hard (means: have two storage
layers, one for db, another for xml or flat file). Or maybe we could use
Creole, and write a Creole interface for berkeley db ?

<snip>

Anyway. I managed to have a nullDriver for Creole.

What is a null driver ? a fake driver doing nothing ?

-----------
Now. Yes. The nullDriver class for Creole does nothing.
So you can run everything of binarycloud that is not using data from the 
database.
As a matter of fact, this concept runs. With the new conf: too.
myConf->set(path,value) does the job.

I'm porting apps that typical say '$CONF_12 = 'blahblah'; in saying
myConf->set('CONF_12','blahblah'). Than extract(myConf->get('*');
That seem to work.

wim niemans.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.