Parsoid/Round-trip testing/Templates

Overview/Motivations edit

This is a comparison/survey of some templating systems that can be used with node.js, for the purpose of selecting an appropriate one to refactor Parsoid's round-trip testing code. Using a templating system will allow us to separate code from UI, cleaning up the current mix of HTML and JavaScript. This page focuses on DOM-based options, as we are considering using a DOM-based templating system, in line with longer term goals of Parsoid. This page is a work in progress; suggestions are welcome!

Factors to consider in choosing a templating system edit

Logic-less vs with logic edit

Server-side vs client-side edit

Security (are data values rendered into views escaped correctly?) edit

Partials (are they available; do we need them?) edit

Speed edit

Maintainability (is the system maintained/used a lot?) edit

DOM-based vs string-based edit

DOM-Based Templating Systems edit

Test Cases edit

Test cases, rendering tables and lists from JavaScript objects, are to be found in this GitHub repo, along with notes in the readme about how the different systems bind data.

Maintenance/Usage data (as of 12/16/2013) edit

Transparency edit

From npmjs.org: current version last updated 7 months ago; 144 downloads in the last week; 765 downloads in the last month.

From Github: latest commit 7 months ago; 12 contributors.

PURE edit

From npmjs.org: current version last updated 3 years ago; 15 downloads in the last week; 68 downloads in the last month.

From Github: latest commit 1 month ago; 4 contributors.

Weld edit

From npmjs.org: current version last updated 2 years ago; 21 downloads in the last week; 96 downloads in the last month.

From Github: latest commit 10 months ago; 8 contributors.

Dependencies edit

jsdom

Plates edit

From npmjs.org: current version last updated; 170 downloads in the last week; 654 downloads in the last month.

From Github: latest commit 7 months ago; 24 contributors.

DOM.js edit

From npmjs.org: current version last updated 10 months ago; 21 downloads in the last week; 110 downloads in the last month.

From Github: latest commit 6 days ago; 1 contributor.

Dependencies edit

es5-ext

Other DOM-Based Templating Systems edit

These seem to be newer/less developed/used.

Mold.js - "handlebars like syntax"

Soma-template - also looks like handlebars

Dombars - based on handlebars

Template-Tal - this is a template attribute language, like Distal

Recommendations edit

References/links edit

Templating systems discussed above edit

Other surveys/comparisons edit