Yes if your roundtrip is slow then doing it clientside can make it seem more responsive. There is the issue though of what happens if the server save fails? Revert your changes? Overall using serverside output is less troublesome, easier to code, and more robust.
On 8/20/09, drewB <[email protected]> wrote: > >>Unlikely. There is very little difference in computation effort >>between generating JSON, XML, HTML or delimited text at the server. > > I will have to take your word for this. I assumed it to be different. > >>So why put it in two places? Why turn data into say JSON just so you >>can later turn it into HTML? Just create HTML in the first place using >>a template on the server. > > It would only really only be in one place - client side scripting. > The JSON would be a single line. > >>The greatest time taken is in getting the data from the server, which >>will be (pretty much) the same regardless of how the data is >>formatted. > > If it takes place client-side, the client doesn't need to wait for > data to come back from the server before the new items are displayed. > They are displayed right away while data is sent back to the server to > be saved. > > > -- Sent from my mobile device --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---
