[Catalyst] YAML vs. *
Andrew Ford
A.Ford at ford-mason.co.uk
Fri Jun 9 18:09:53 CEST 2006
As I said in a reply in another thread, I agree with your appraisal of YAML.
My preference is for INI style files for the majority of applications --
not that I like the syntax but it is simple and seems most
understandable to the clients I have come into contact with.
Configuration files should be simple for support staff to understand and
modify, and most do understand Windows-style .ini files.
Generally it is just going to be database usernames and passwords, and
maybe a directory path or two that may need to be tweaked. If there are
other more complex items that need configuring, they probably won't be
changed often or by less experienced staff, so if needs must split the
config into common stuff in an .ini file and more complex stuff
elsewhere in a different format. Arguments like "elegance" don't count
for much when a client has been bitten by someone mangling the
configuration and not being able to bring up the application (he says,
speaking from experience).
Andrew
Matt S Trout wrote:
> I love YAML as a serialisation format for data transfer, but so far as stuff
> like config files that are designed for human write / machine read, I
> personally think it sucks. Massively.
>
> And for hysterical raisins it's currently our default config file formats, and
> I see users running into trouble getting their myapp.yml to parse right all
> the flipping time. So, I'm wondering if this is just me being a YAML-hating
> heretic or if other people are of the same opinion.
>
> A few (IMO) better options -
>
> Config::General -
>
> <View TT>
> INCLUDE_PATH __path_to('root')__
> </View>
>
> JSON -
>
> {
> 'View::TT': {
> INCLUDE_PATH: "__path_to('root')__"
> }
> }
>
> INI-style -
>
> [View::TT]
> INCLUDE_PATH=__path_to('root')__
>
> What do you all think, then? (/me dons asbestos suit, waits for the holy war
> to start :)
>
>
--
Andrew Ford, Director Pauntley Prints / Ford & Mason Ltd
A.Ford at ford-mason.co.uk South Wing Compton House
pauntley-prints.co.uk Compton Green, Redmarley Tel: +44 1531 829900
ford-mason.co.uk Gloucester GL19 3JB Fax: +44 1531 829901
refcards.com cronolog.org Great Britain Mobile: +44 7785 258278
More information about the Catalyst
mailing list