JSFoo 2011

It’s like kung fu with JavaScript and objects! All about building full size apps in JavaScript.

Ravi Pratap


Client-side Mustache.js based rendering in JS

Submitted Jul 9, 2011

We will demo Touchsite, the world’s first native-app like experience for tablet devices built entirely in HTML5. In this talk, we will reveal how we use this techniques in Touchsite.

Our rendering stack in JavaScript (using Mustache JS) consumes data in JSON, making async requests to the backend, and renders all on the fly on the client side.


The problem:

HTML UIs in modern apps are becoming more user controlled: rendering for each user’s preference, getting the required data, pushing them out is quite a bit of load on the server.


Rendering in today’s web world can be done late in the stack, and better still in the browser itself. JavaScript is great in async data requests, but most applications use JS to request for “rendered” HTML snippets. But we can go event further and render literally nothing on the server. All HTML is generated on the browser with just JSON input. The JS engine is more aware and can also model data (using Backbone for example, but beyond this talk).


A knowledge of JavaScript and any of the backend stacks would be expected.


{{ gettext('Login to leave a comment') }}

{{ gettext('Post a comment…') }}
{{ gettext('New comment') }}
{{ formTitle }}

{{ errorMsg }}

{{ gettext('No comments posted yet') }}

Hosted by

JSFoo is a forum for discussing UI engineering; fullstack development; web applications engineering, performance, security and design; accessibility; and latest developments in #JavaScript. Follow JSFoo on Twitter more