The JavaScript blog.


JSON templating discussions

Discussion: JSON vs. Markup Fragments

Posted on .

Alex Kessinger is a programmer who lives in the Bay Area. He strives to make websites, cook, and write a little bit better each day. You can find more from Alex at his blog, on Twitter, and Google+.

Recently at work we were discussing a new trend in
web application development, whereby markup is rendered on both the
server and client. The Google+ team talked about this openly in this
post by Mark
with particular focus given to performance. Why does rendering content
on both the server and the client improve performance?

This is clearly something that people seem to think is a good idea. Some
templating languages, like mustache, are
available in many different languages, making it easy to use them on
both the client and server. Now, if you're a front-end developer by
trade, you might be more comfortable with rendering everything on the
client. That doesn't mean that it's faster; it's more of a comfort

So, community, my questions for you are as follows:

  • Is Google+'s approach of rendering markup on the server really faster than transmitting data?
  • Are there ideological or philosophical arguments for delivering data or markup?
  • Is it appropriate to mix both approaches?