Processing templates in Javascript
Published November 10th, 2005One of the most tedious and awkward tasks for anyone using Ajax methods to fetch data from a remote source and then update a page, is building the HTML in Javascript. You’re stuck with either interpolating your data into great big Javascript strings (not helped by the fact that you can’t use line breaks in the code) or building objects through the DOM.
Today a colleague pointed out Javascript Templates from TrimPath, which I really wish I’d found six months ago. As the name suggests, it’s a templating language for Javascript, which takes a lot of the pain out of the process of creating HTML from loaded data.
Leave a comment
Comment Policy: First time comments are moderated. Please be patient.