[
Lists Home |
Date Index |
Thread Index
]
On 15/06/06, Berend de Boer <berend.de.boer@xsol.com> wrote:
> I doubt many people would use it if XML could be easily and portably
> handled by browsers. Now DOMs, XPath and XSLT is all very tricky.
I agree that the DOM interface in browsers is tricky, because it's
specified at much too low a level for typical web development (and
it's designed to work with mixed content, which makes interfaces much
more complicated). Defining 5 or 6 small convenience methods for
data-oriented XML can make using the DOM much simpler, if anyone feels
so inclined.
That said, I think that part of the disconnect is between people who
think in terms of serialized objects and people who think in terms of
general information interchange, including tree models. There have
been lots of attempts to exchange objects, but none (CORBA, DCOM, and
Java RMI spring immediately to mind) has caught on so far for
information exchange outside the firewall in the web at large.
One problem is that different languages have different object styles
and slightly different ideas of what constitutes an object, so that a
serialized Java object is going to be, at best, awkward in perl, and
vice-versa (and at worst, unusable, especially if attribute names are
keywords in another language). A second problem is that not all
information fits naturally into an object-based model.
JSON works well for AJAX because it's tightly targetted at JavaScript,
just like Java RMI is tightly targetted at Java or DCOM is tightly
targetted at Windows development. The other languages that have JSON
libraries use them almost exclusively for exchanging information with
Javascript in browsers, and as a result, developers are willing to
live with the JavaScript style and idiosyncracies. Also, most of the
JSON information exchanged is single-purpose (server-browser or
browser-server messaging) and short lived (typically less than a
second), so the design goals are different.
All the best,
David
--
XML 2006 Conference: http://2006.xmlconference.org/
Megginson Technologies Ltd.: http://www.megginson.com/
|