The DOM-based template language relies on the DOM tree to recognize template directives. DOM-based templates will go through the DOM tree to find directive templates, and then process the DOM tree to create the final DOM tree, which is then displayed in the browser. The DOM-based template language only works in the browser if the server does not use a virtual DOM. The DOM-based template language is inherently much slower because templates cannot be precompiled, since the input is a DOM tree that needs to be processed and the output is a processed DOM tree. In comparison, text and HTML templates can be precompiled into a JavaScript function, which is the result of a compiler analyzing the template to find all the interesting dynamic parts.
DOM:
AngularJS, Knockout, Weld
Patrick Steele-Idem JavaScript Templating Landscape http://psteeleidem.com/the-javascript-templating-landscape/ JavaScript.