4 ms·
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 spa
by dmix 14y ago
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.
- gliese1337 14y agoYou 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.