JSFoo 2011

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

Client-side Mustache.js based rendering in JS

Submitted by Ravi Pratap (@ravipratap) on Jul 9, 2011

Section: Default Technical level: Intermediate Session type: Demo Status: Submitted

Abstract

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.

Outline

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.

Solution:

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).

Requirements

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

Links

Comments

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

{{ gettext('You need to be a participant to comment.') }}

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

{{ errorMsg }}