News for hackers. Stuff that matters.
Re:Stop sending template engines to the browser. How to make... by dmix on Friday September 14, 2012 @01:41AM (#4520253)
This is impractical with any JS-heavy application; where you are working primarily with javascript data structures and not the DOM.

It also leads to jQuery spaghetti code. So many people use jquery like a shotgun, to solve every JS problem, when better - and more targeted - solutions can be tailored out of small modular libraries.

Re:Stop sending template engines to the browser. How to make... by gliese1337 on Friday September 14, 2012 @02:07AM (#4520310)
You only get jQuery spaghetti if jQuery is your method of choice for manipulating the DOM. Most of my work is extremely JS-heavy applications, and I've never found it necessary to use string-interpolating templates. I have found it very useful to use a hand-rolled "template" system based on DOM structures, with data-attributes indicating where the templating engine should insert stuff. Might turn it into a real library someday, but it's really simple, so I don't see a whole lot of point to doing so yet.