Tony said:
I'm wondering if anyone has run any tests to compare the speed of
parsing XML vs text in simple lists - such as:
<?xml version="1.0" encoding="ISO-8859-1"?>
<users>
<user>User 1</user>
<user>User 2</user>
<user>User 3</user>
</users>
and retrieving using .responseXML
vs:
User 1|User 2|User 3
then using .split('|') to parse the .responseText
Just a matter of curiosity - thx!
That collides with a rather old discussion "What's wrong with AJAX":
<
http://groups.google.com/group/comp..._frm/thread/f6ce0a5e95d8bf30/95c4d63e4c82f068>
Still the whole year 2005 has been spent by numerous users to
re-discover an open-source fact: for explicit script handling XML is
the least convenient and the most uneffective format one could imagine.
But Microsoft IXMLHTTPRequest was never minded to be used in such way.
It was merely further evolution of *data binding*: one click to change
the source leads to "zero maintenance" page update.
The curved path by where the things went can be traced back to the
famous Adaptive Path article
<
http://www.adaptivepath.com/publications/essays/archives/000385.php>
By simply reading posts in this newsgroup one can trace the development
from the initial attempt to use AJAX for XML - to the final use as a
simple responseText grabber where the responseText evolutionated from
some XML-like format to script-ready and script-friendly format close
to the serialized object form.
Eventually as I expected people dropped any XML-attempts whatsoever and
started to move to JSON (or JSON clones) as transport media.
Next year I see further evolution of AJAX/JSON symbiotic use, but it is
a limited path because of AJAX same-domain limitation. It makes it hard
to use in a complex corporate environment (with different sub-domains
and even domains). Also it is not usable for server-side free RSS
feeds. After the users will be fed up enough of this: they will move on
some cross-domain free solution like script.src (or something else).
Initially it will be kind of hack, but it will be eventually blessed
into standards as soon as it will get enough popularity. I accept bets
on it as 2:1
Another great influence of AJAX is the power demonstration of users to
browser producers and standard writers. Some browsers could not /
refused to implement the most basic features for years. So more amazing
it was to watch the entire year how they rushed to implement or at
least mimic XMLHttpRequest functionality to not loose their users. And
they actually *fixed all bugs in a timely manner*, sometimes within a
month! Just for this reminder who is the customer and who is the humble
service provider - just for this we have to love AJAX.
IMHO