Upgrade to Pro — share decks privately, control downloads, hide ads and more …

JsRender Fundamentals: Templating for HTML5 Applications

JsRender Fundamentals: Templating for HTML5 Applications

This is a JsRender Fundamentals presentation I gave at the Spring 2012 DevConnections conference in Las Vegas. It covers some of the key topics you need to know to build web applications with JsRender. Learn how JsRender brings a new templating library to HTML5 development that has a code-less tag syntax, high performance, no dependency on jQuery nor a DOM, supports creating custom functions, and uses pure string-based rendering.

John Papa

April 02, 2012

More Decks by John Papa

Other Decks in Technology


  1. @JOHN_PAPA var i = 1; $(movies).each(function () { var movie

    = this; $("#movieContainer").append( "<div>" + i++ + ": " + movie.name + " (" + movie.releaseYear + ")</div>"); });
  2. @JOHN_PAPA Var tmplString = "<div>{{:firstName}}</div>"; var myTmpl = $.templates(tmplString); htmlString

    = myTmpl.render(myData); $("#myDiv").html(htmlString); var htmlString = $("#myTmpl").render(myData); $("#myDiv").html(htmlString);
  3. @JOHN_PAPA {{if expression1}} ... {{/if}} {{if expression1}} {{else expression2}} {{/if}}

    {{if val1 !== val2}} ... {{/if}} {{: (val1> val2) ? "this" : "that"}}