From: Luca M. <lma...@gm...> - 2008-03-15 00:42:39
|
Well yeah, if you're trying to keep the connection with server alive (through Javascript timers, Ajax and such) I would also recommend JSON. Since when you recieve the data from the server all you have on the client is JavaScript its natural to use Javascript Objects (JSON) to pass data around. For general purpose data loading though its probably best to just render HTML on the server and send it as it is, PHP is pretty good at this. Luca On Fri, Mar 14, 2008 at 04:16:21PM -0700, matt donohue wrote: > Yeah- I would use AJAX to talk/poll server and JSON as a fast transport of state objects > and either sessions or a db to store the state on the server. Sessions have an expiration > you'll need to account for but otherwise you'll need some authentication for a db state. > Using JSON to store all the state/object data between server and client would keep it pretty simple without a lot of translation. I usually code all my client UI's to just handle JSON, which keeps your code very clean. Translating a JSON object array to a sortable table for example is very fast and efficient and can be used over and over. > > Matt |