What Javascript engine templates do you recommend?

I would like to know your opinion on a javascript template which, in your opinion, is better in terms of performance?

I found some links where people benchmark:

http://jsperf.com/jquery-template-table-performance/15

http://jsperf.com/jquery-template-table-performance/8

http://www.viget.com/extend/benchmarking-javascript-templating-libraries/

+78
javascript template-engine
Oct 17 2018-11-11T00:
source share
5 answers

Engine-Chooser Template! - A tool that will help you choose the right template engine for your project.

+107
Jul 09 '12 at 15:59
source share

In terms of performance, I found that this is not the template engine itself, but more if it is possible to precompile templates. It is good practice to combine and minimize all JavaScript source files into a single file in production mode, so this is basically the same step as compiling templates.

I used the jQuery and Mustache template for client-side templates, but my favorite is still EJS , which has always formed much faster than everything I've tried so far, especially in production mode (compiles to own string concatenation whenever possible and requires only one DOM access to actually insert the rendered view). It is part of the JavaScriptMVC framework and when used with StealJS as a dependency manager, it already does the whole compilation template for you (The View Engine also supports Micro, Mustache and jQuery templates).

+23
Oct. 17 '11 at 1:52
source share

Maybe PURE - it allows you to convert JSON to HTML with templates created from your existing html, and not from a separate template with special syntax.

From the PURE website:

A simple and ultra-fast template tool for generating HTML from JSON data

Presentation (HTML) and logic (JS) remain completely separate

Works autonomously or with dojo, DomAssistant, Ext JS, jQuery, Mootools, Prototype, Sizzle and Sly

The best way to understand is to see what this library really does : (from an official demo) pure template engine demonstration

All demos here

+11
Oct 23 '12 at 8:26
source share

LinkedIn went off with dust.js http://akdubya.github.com/dustjs/

+7
Apr 3 2018-12-12T00:
source share

Choose a template language in which api and syntax you find the most attractive. If you run into performance issues, you can look at alternatives.

Unless you create tables with thousands of rows, you probably won't notice the difference.

Personally, I use Google Closure Templates . I chose it mainly because it also has a Java implementation. I have never done tests.

+4
Oct 17 '11 at 2:16
source share



All Articles