New Article on JsRender Templating | John Papa

John Papa

Evangelist on the loose

New Article on JsRender Templating

...

Super fast rendering, easy to pick up, no DOM nor jQuery dependency. That’s JsRender. Check out this month’s Client Insight column where I cover the basics of JsRender. And be on the lookout for my new full length course on JsRender, coming to Pluralsight in May 2012.

JsRender is the successor to jQuery Templates created by Boris Moore. It 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.

So instead of writing code like this:

var i = 1;
$(my.vm.movies).each(function () {
var movie = this;
$("#movieContainer1").append(
"<div>" + i++ + ": " + movie.name + " ("
+ movie.releaseYear + ")</div>");
});

you can write code like this:

<div>
{{:#index+1}}: {{:name}} ({{:releaseYear}})
</div>
tags: Client Insight javascript jquery jsrender pluralsight
  • Meir Krudo

    Hi Papa,
    great post!
    you did excellent job with the knockout course, just renew my subscription – looking forward for the JsRender in May.
    Meir

  • john

    Meir – Thanks, glad you enjoyed the article and the course!

  • Raj S

    Hey John,
    Just when I thought it could not get better than your Knockout course, JSRender was even better. Thanks for your work.
    Raj

%d bloggers like this: