Re: Conf: argue !

[email protected]
Newsgroups gmane.comp.lib.binarycloud.devel
Organization Solutions Only
Message-ID <4221DC1F.14183.4E4E2C@localhost>
On 27 Feb 2005 at 13:21, Manuel Holtgrewe wrote:

> Hi
> 
> >>/smarty
> >>/smarty/options
> >>/smarty/options/plugins_dir  =>(BC_PATH_BASE . '/smarty/libs/plugins')
> >>/smarty/options/plugins_dir  =>(BC_PATH_BASE . '/smarty-plugins')
> > 
> > 
> > this builds an array from like-pathed conf values, so an integer PK is
> > obviously required.
> 
> This will not work if you want to translate the following:
> 
>    array(
>      array(
>          'foo',
>          'bar',
>      ),
>      array(
>          'foo2',
>          'bar2',
>      ),
>    )

It's not an issue. The design says 

        //domain_name / section_name [/.......] / property_name => value

So it *clearly* does not allow for properties without a name.
Since arrays are not considered any more, your example is illegal:
this cannot be done within the design.

One may argue that we need numerics as a property_name. Sure.
The impact on the code is huge since the php-trick has to be neutralized.
But whatever the list is voting for, it will be done.

Please note that in above example for '/smarty', the 'plugins-dir' moves 
from a section into a property. Didn't see a comment on that 'feature'.

Maybe you work the numeric key out in a proper way, including rules for 
the numerics  in the name ('must be consequetive', 'can't be set', 'can't 
be mixed with alfa_names', 'must be sort_able', 'whatever'). Show the 
impact when the array(foo,bar) changes into array(bar,foo) and make it a 
conceptual design.
The effort to do that is such heavy and confusing that you would gladly 
propose 'Why don't we allow for arrays in the value'.
Don't understand me wrong here: that's the path I walked already.

;-))

wim niemans




> 
> What about "real" trees then:
> 
>    section := (id, parent, name)
>    property := (id, parent, name, value, type)
>    nameless_property := (id, parent, value, type)
> 
> They would solve the problem nicely. Speed is not an issue if we do 
> caching and configuration trees are bound to be comparatively small.
> 
> 
> 
> Manuel
> _______________________________________________
> dev mailing list
> dev-PnctHDZWAvB/Cz2I37pSEPZ4XP/[email protected]
> http://lists.binarycloud.com/mailman/listinfo/dev
> 


_______________________________________________
dev mailing list
dev-PnctHDZWAvB/Cz2I37pSEPZ4XP/[email protected]
http://lists.binarycloud.com/mailman/listinfo/dev
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.