Feedback on Ruby XML binding/mapping tools?

V

vasudevram

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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
B

Bob Hutchison

Hi,

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/>
 
V

vasudevram

Bob said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,835
Latest member
lila30

Latest Threads

Top