>
> I haven't read through it in detail yet, but it looks like you've simply
> invented yet another data binding framework. Perhaps unique is that
> you've used annotations here, butn otherwise what does this do that
> several other databinding frameworks (JAXB, Castor, Zeus, etc.) don't?

I've skimmed JAXB before, but perhaps a bit too hastily. Castor and
Zeus are news to me. To be honest, the flurry of SAX/DOM (JDOM, DOM4J,
java's own DOM, Xalan)... made it somewhat difficult to figure out
there are in fact other streams of thought on how to parse XML out
there.

I've looked at those 3 binding frameworks, and you're basically right,
this tool does not do significantly more, though I would suggest to
the authors of those tools they also offer annotations-based
configuration - in various circumstances it's just easier to maintain
all of it as code instead of a bunch of separate XML documents (ie:
for some simple developer, to use JAXB, he needs to learn schema). A
10 minute tutorial would also not go amiss - before I managed to
figure out exactly what JAXB can do, an hour had passed. But, that's a
documentation complaint.

The main new thing MOX appears to bring to the table is that you don't
need to know very much about XML to use it. For example, knowledge of
XML Schema or DTDs are not required; define your XML structure as
familiar java classes with some annotations tacked on, and there's
your simplified 'schema'. "Validation" occurs automatically - if the
input XML can't be stuffed into the classes you wrote, MOX throws an
exception with the culprit as message. Yes, it isn't quite as
flexible, but it allows being very proficient at reading and writing
XML documents without any serious XML knowledge.

In other words, none of the tools out there so far are very friendly
to the layman.

Then again, those tend to be using other programming languages,
perhaps, such as PHP, ruby, or python.


>
> The limitation you advertise is a common problem with data binding
> frameworks. They are very rigid and inflexible, and can't handle the
> extensibility of XML. Properly written DOM or SAX (or XOM) code does
> much better. XSLT does much better still.

If MOX (and I'm guessing JAXB, Castor, and Zeus as well?) encounters
unknown tags or attributes, they get skipped - or, I can add an
annotation that allows unknown tags to get sent as either a DOM
Document, or as a plain string, to a special 'unknown tag' handler
method. It's a rather basic support for extensibility, but most
applications using  XML formats for data exchange don't need any more
than that.

Stuff ordinary programmers just use their own internal data formats
for, or property files, or just serialized objects, because working
with a DOM parser is far too much hassle - that's where MOX (and
apparently the other 3 binding engines you've mentioned) shine.

 -- Reinier Zwitserloot

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to