Usually, when writing richer web applications, I generate the base thing on the server, bring in Javascript, have it pull in whatever data in JSON over AJAX/XHR (whatever term you use), and use either jQuery or Mustache to generate new HTML as needed.
I talked with another developer yesterday, and he said he sometimes generates new HTML on the server side and imports it with AJAX. My thought was that increasing the size of the thing being moved over the wire was a greater speed killer than generating the HTML on the client side, while he asserted the opposite.
(Honestly, I feel he reacted like I was attacking him and his methodology, while I was just curious about a way of doing things I didn't really understand, so it wasn't as productive a conversation as I would've hoped.)
Seems worth a few tests, but such tests would have to be fairly macro scale. If the size of the rendered content is akin to <div>adding something small like this</div>, it just wouldn't matter.
Any thoughts? #webdev
I talked with another developer yesterday, and he said he sometimes generates new HTML on the server side and imports it with AJAX. My thought was that increasing the size of the thing being moved over the wire was a greater speed killer than generating the HTML on the client side, while he asserted the opposite.
(Honestly, I feel he reacted like I was attacking him and his methodology, while I was just curious about a way of doing things I didn't really understand, so it wasn't as productive a conversation as I would've hoped.)
Seems worth a few tests, but such tests would have to be fairly macro scale. If the size of the rendered content is akin to <div>adding something small like this</div>, it just wouldn't matter.
Any thoughts? #webdev
No comments:
Post a Comment