< Parsoid < Round-trip testing

Overview/Motivations

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

Logic-less vs with logic

Server-side vs client-side

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

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

Speed

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

DOM-based vs string-based

DOM-Based Templating Systems

Test Cases

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)

Transparency

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

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

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

jsdom

Plates

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

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

es5-ext

Other DOM-Based Templating Systems

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

Templating systems discussed above

Other surveys/comparisons

This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.