ajax serialization

Different kinds of serialization of data are possible.

AHAH

Return prerdendered HTML from server:

  • less effort in client +
  • data not really reusable in client -
  • data to serialization overhead great -
  • no parsing needed +

Json

return a javascript object noted as javascript and eval it.

  • using eval in client -
  • data to serialization overhead small +
  • data optimal reusable ++
  • no parsing needed +

Xml

Generate a XML Format and use a clientside logic to use the data via dom operations.

  • dom parsing of data slow -
  • data to serialization overhead great -
  • data good reusable +
  • xml parsing needed -



WDDX

Wddx has its origins in Xold Fusion and is a XML Format to serialize and deserialize Data and Objects. PHP has wddx support.

  • wddx in js slow & not usable for large datasets --
  • data to serialization overhead great -
  • data good reusable +
  • xml parsing needed -
  • ease of use +


Soap

Even webservices can be used. Objects are invoked from webservices.
  • data to serialization overhead great -
  • data optimal reusable ++
  • xml parsing needed -


No Serialization


Data comes unserialized from server as text and is passed into a string.
  • fast data -> js ++
  • no serilalization +
  • data reusable +
  • no xml parsing needed +
  • only one result and value can be used --
Related Entries:
pnajax with json further developments
everthing new
foxy web developer toolbox
talk at xtech
sebs 1 eval in jsObjects 0
Comments (6)  Permalink

Comments

leo @ 27.02.2006 23:54 CEST
Done a small map with google maps a few month ago and have some troubles because parsing the rdf data with dom was way to slow. After reading your text, I think perhaps cvs-data-set can be a solution for simple datasets.
Sebs @ 28.02.2006 12:03 CEST
i guess a solution could be a serverside parsing of the rdf to json.
BUt i am not sure, just playing around with gmaps and having a first idea where i can use it.
leo @ 04.03.2006 20:40 CEST
I tried it out today and implement server side parsing of rss to json. It works and is now a bit faster than with client side parsing.
Sebs @ 09.03.2006 14:07 CEST
good that it workd ;) I need to play with that geo infos for a own application too ;)
leo @ 09.03.2006 14:25 CEST
If you are intrested in the source let me know I can send it to you (but it's only a small hack with magpieRSS).
Sebs @ 09.03.2006 14:54 CEST
schuermann [at] mayflower.de ;) I am keen on seeing how i can integrate my own locations into that map.

S.
No new comments allowed (anymore) on this post.