I did try using YAML to pass data in HTTP headers from a (public-facing) server running mod_perl to a back-end server running mod_ruby. Since the data was pretty simple (a Hash), and therefore also a primitive type in both Perl and Ruby, YAML seemed like a good fit. It worked almostly completely smoothly; I seem to remember finding some surprises with empty elements, perhaps. I can't quite remember (not at the same PC today). Anyway, the code was amazingly concise compared to the stuff I write to use XML as a Perl-Java bridge.

In this area, YAML has got some things going in its favour: a fast C-implementation (Syck) that works with PHP, Python and Ruby (it's in the 1.8 core); potentially less code; and less "stuff" to shunt about. I can see it being useful in internal applications, where the ease of cross-platform object sharing is a win; I can't see it taking off in public interfaces, where the preponderance of the (often Java-backed) XML apps is so great. Plus, bear in mind that they're not really the same thing; XML is a far more general-purpose tool than YAML, which is (just) a 'data serialization language.

cheers
ViceRaid


In reply to Re: Re: Data Exchange between perl and java. by ViceRaid
in thread Data Exchange between perl and java. by GermanHerman

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.