3

What reasons for using javascript template engines do you know? When to use and to avoid using it?

And do we need to use JTE like underscore.js, when we already have framework like jQuery installed?

Also, what template engines for using with jQuery you can recommend?

Nikolay Fominyh
  • 8,946
  • 8
  • 66
  • 102

1 Answers1

1

Older browsers lack of new ecmascript/javascript functions and features. When you need to use latest functions (map, reduce) and features (html5, css3, websockets) you may need that kind of libraries like Underscore, modernizr etc. They are also shorten your code. Underscore has useful utility/helper functions that you can use.

  • jQuery: DOM library
  • Underscore: General use for arrays/objecys
  • Modernizr: HTML5, websockets, canvas
  • Sass: CSS library
  • Templating: Jade, Mustache, ICanHaz.js

I personally using jade with node. It's very useful for quick view/renders.

Erhan
  • 1,126
  • 8
  • 11