Tags Ruby
As I mentioned here, I had a choice of using either XML or YAML for the configuration files in the new version of ESMS. YAML won for two reasons:
  1. It is much more lightweight and looks natural. Big configuration files in XML become complex and cluttered, while YAML scales admirably in this respect.
  2. The current de-facto XML implementation in Ruby is REXML, which I dislike. REXML is useful for employing XML as a serialization format, but is less good as a configuration file reader, because its error handling is very bad. On the other hand, Syck (the built-in YAML parser / emitter in Ruby) is easy to use, fast and has good error handling and reporting.
The following are good resources for YAML in Ruby:
  1. Yaml cookbook - shows probably all you'll ever need to understand how Yaml entities map to Ruby code. Very useful.
  2. Yaml.rb docs - A reference manual with examples for the Yaml.rb library.
  3. YAML specification - from the official YAML website (yaml.org). A crisp yet well written reference to the YAML syntax and semantics.