[Catalyst] YAML vs. *

John Napiorkowski jjn1056 at yahoo.com
Fri Jun 9 17:46:53 CEST 2006


As a relative newb to Catalyst, the only reason I
started to pull hairs out of my head with YML was the
impression it was the best practices way to do
configuration and that the other stuff was only around
to support legacy stuff.  Since my goal is
supportability and the ability to hire people that can
get working without a lot of training on the in-house
techniques it is important for me to try and do things
the way most catalyst developers would expect.

The fact I had so much trouble with YAML at first
caused me to waste a lot of time.  Also it caused me
to just put all my configuration options hard coded
into each module, which made it trouble for me when I
wanted to clone applications.  Eventually I grasped
enough YAML to consoladate all the config in one
place. which is my preference.  But I still have
trouble with it.  I end up using the YAML shell all
the time to translate perl structures.

I would have greatly preferred a different format for
configuration when I first came to Catalyst.  I would
have spent less time scratching my head and fighting
with configuration files.  Also I would have been able
to follow my personal best practices better.

I imagine people coming to Catalyst already with YAML
experience would not have had my trouble.

I know most people seem to think XML is bloated
overkill, but I would greatly have preferred it.  XML
seems safe to the suits that pay the bills.  Most of
them get nervous when I say configuration is using
YAML.  Actually I would prefer something based on a
RDF XML format, but I doubt people want a
configuration with namespaces in it :)

INI style would be my next choice, although I can see
trouble using that for anything other an key/values.

JSON to me is like YAML, seems okay for serialization
or thing generated by machines to be used by machinese
(or by a human trying to debug).  My feeling is that
if we are going to use a configuration format that
uses data structures, why not just use Perl and reduce
any changes for confusion?

My two cents.  --john

--- Matt S Trout <dbix-class at trout.me.uk> 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 :)
> 
> -- 
>       Matt S Trout       Offering custom
> development, consultancy and support
>    Technical Director    contracts for Catalyst,
> DBIx::Class and BAST. Contact
> Shadowcat Systems Ltd.  mst (at)
> shadowcatsystems.co.uk for more information
> 
> + Help us build a better perl ORM:
> http://dbix-class.shadowcatsystems.co.uk/ +
> 
> _______________________________________________
> Catalyst mailing list
> Catalyst at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the Catalyst mailing list