Page 1 of 1

ajax and xml

Posted: Sat Jun 17, 2006 4:45 pm
by howardr
i have to make a small photo gallery thing for work. i was curious to know if many ajax webapps actual return XML? i says this because right now with my development version i just return:

Code: Select all

24||imageurl||johndoe||a description of the image
then i use a javascript .split('||') to get an array of the info

in theory i know i should do this:

Code: Select all

<image>
    <id>id</id>
    <src>http://...</src>
    <user>johndoe</user>
    <description>a description of the image</desctiption>
</image>

Posted: Sat Jun 17, 2006 5:06 pm
by s.dot
I would say XML is pretty much how most people do it. Although, if it ain't broke.. don't fix it :-P

Posted: Sun Jun 18, 2006 12:07 am
by d3ad1ysp0rk
scottayy wrote:I would say XML is pretty much how most people do it. Although, if it ain't broke.. don't fix it :-P
From what I've seen, the X in Ajax if often ignored.

People should definitely try using it though, it definitely helps to return cleaner, more usable results.

Posted: Sun Jun 18, 2006 1:05 am
by John Cartwright
scottayy wrote:I would say XML is pretty much how most people do it. Although, if it ain't broke.. don't fix it :-P
I generally would not follow this advise, unless of course maintainabiltiy, readability and standardization isn't important to you. :wink: