Feedback on Ruby XML binding/mapping tools?

Discussion in 'Ruby' started by vasudevram, Sep 10, 2006.

  1. vasudevram

    vasudevram Guest

    Hi group,

    I'd like to hear from anyone who has used any Ruby XML binding/mapping
    tools such as xml-mapping, xampl, etc. Pros and cons of such tools, and
    also pros and cons of such tools vs. handwritten code.

    Working on a project where these might be of use, though not using them
    as of now - already have some code written using just Ruby and REXML.
    But might want to replace the hand-rolled code later if any reason is
    found for doing so.

    I've done a bit of work with JAXB in Java so I have some idea of the
    concepts involved.

    Thanks
    Vasudev Ram
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Software training and consulting
    http://www.dancingbison.com
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    vasudevram, Sep 10, 2006
    #1
    1. Advertising

  2. Hi,

    On Sep 10, 2006, at 12:30 PM, vasudevram wrote:

    >
    > Hi group,
    >
    > I'd like to hear from anyone who has used any Ruby XML binding/mapping
    > tools such as xml-mapping, xampl, etc. Pros and cons of such tools,
    > and
    > also pros and cons of such tools vs. handwritten code.


    Warning, xampl is my thing and I'm biased :)

    JAXB and xampl take a different approach but operate at a similar
    'level'. Xampl is trying to facilitate rapid code development and has
    a fairly significant runtime library associated with it. You add
    functionality to xampl object in ruby by re-opening them and adding
    what you want (or you can arrange for xampl to re-open your classes
    and add its stuff). You can, but it isn't the plan, to use xampl
    generated objects as data objects as you are more likely to do in
    JAXB. Xampl also works from examples of XML documents (hence 'xampl')
    -- it doesn't work from a schema. When you write code using xampl
    generated objects you are writing ruby code (or java or common lisp)
    and there isn't a lot of XMLisms that show up.

    I am working on a Rails application now that uses xampl instead of
    ActiveRecord. This means that xampl also handles persistence of its
    objects (and caching etc). This is absolutely fundamental to xampl.

    xampl can be used as an alternative to DOM (and it is) but there are
    other tools that are much more suited to that task (you wouldn't use
    JAXB for that either I think).

    I can go on and on about this, and have elsewhere, but probably not
    in a direction you're interested in. Is there anything specific you
    wanted to do? or know about xampl?

    Cheers,
    Bob

    >
    > Working on a project where these might be of use, though not using
    > them
    > as of now - already have some code written using just Ruby and REXML.
    > But might want to replace the hand-rolled code later if any reason is
    > found for doing so.
    >
    > I've done a bit of work with JAXB in Java so I have some idea of the
    > concepts involved.
    >
    > Thanks
    > Vasudev Ram
    > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    > Software training and consulting
    > http://www.dancingbison.com
    > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    >
    >


    ----
    Bob Hutchison -- blogs at <http://www.recursive.ca/
    hutch/>
    Recursive Design Inc. -- <http://www.recursive.ca/>
    Raconteur -- <http://www.raconteur.info/>
    xampl for Ruby -- <http://rubyforge.org/projects/xampl/>
    Bob Hutchison, Sep 11, 2006
    #2
    1. Advertising

  3. vasudevram

    vasudevram Guest

    Bob Hutchison wrote:
    > Warning, xampl is my thing and I'm biased :)

    .....
    > I can go on and on about this, and have elsewhere, but probably not
    > in a direction you're interested in. Is there anything specific you
    > wanted to do? or know about xampl?
    >


    Thanks for the detailed reply :)
    We don't need persistence.
    Looks like REXML + XPath may be sufficient for now, only reason to go
    for xml mapping lib may be for possible performance if we have repeated
    queries with same params (to get XML output - to process - from the Web
    services we query).

    Will reply in more detail a little later.

    Thanks
    Vasudev
    vasudevram, Sep 11, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bomb Diggy
    Replies:
    0
    Views:
    429
    Bomb Diggy
    Jul 28, 2004
  2. anita
    Replies:
    0
    Views:
    333
    anita
    Mar 14, 2006
  3. olivier35
    Replies:
    0
    Views:
    268
    olivier35
    Nov 6, 2006
  4. olivier35
    Replies:
    0
    Views:
    411
    olivier35
    Nov 6, 2006
  5. key mapping for command-line tools

    , Apr 7, 2006, in forum: C Programming
    Replies:
    4
    Views:
    288
Loading...

Share This Page