title: Choosing the right UI templating tool - dust.js?
body: <p>I work on a large Java based web application, it has been built up over the past 5 or so years - the UI needs an overhaul / to be largely re-written. We are investigating the available UI tools/libraries/frameworks to use and have come across <a href="http://akdubya.github.com/dustjs/" rel="nofollow noreferrer">dust.js</a> as an option for templating.</p>
  
  <p><strong>The questions:</strong> 
  I'm interested in hearing what users of <a href="http://akdubya.github.com/dustjs/" rel="nofollow noreferrer">dust.js</a> think of it: </p>
  
  <ol>
  <li>Has it been successful? </li>
  <li>Is it easy to use?</li>
  <li>Is it sufficiently documented?</li>
  <li>Is community support good? (only 6 questions on <a href="https://stackoverflow.com/questions/tagged/dust.js">ST tagged 'dust.js'</a>!) </li>
  <li>What are the pros and cons when compared to other templating tools such as <a href="http://documentcloud.github.com/underscore/" rel="nofollow noreferrer">Underscore</a>'s templating, <a href="https://developers.google.com/closure/templates/" rel="nofollow noreferrer">Google Closure Templates</a>, <a href="http://handlebarsjs.com/" rel="nofollow noreferrer">Handlebars</a> and <a href="http://mustache.github.com/" rel="nofollow noreferrer">Mustache</a>.</li>
  <li>Are there any problems using it with an MV* structure framework, e.g <a href="http://documentcloud.github.com/backbone/" rel="nofollow noreferrer">Backbone.js</a> (<a href="http://addyosmani.github.com/backbone-fundamentals/" rel="nofollow noreferrer">online book</a>)?</li>
  </ol>
  
  <p><strong>Some background:</strong></p>
  
  <ul>
  <li><p><em>Why are we interested in dust.js:</em> The following <a href="http://www.linkedin.com/" rel="nofollow noreferrer">LinkedIn</a> blog posts first drew our attention to it:</p>
  
  <ul>
  <li><a href="http://engineering.linkedin.com/frontend/leaving-jsps-dust-moving-linkedin-dustjs-client-side-templates" rel="nofollow noreferrer">Leaving JSPs in the dust: moving LinkedIn to dust.js client-side templates</a></li>
  <li><p><a href="http://engineering.linkedin.com/frontend/client-side-templating-throwdown-mustache-handlebars-dustjs-and-more" rel="nofollow noreferrer">The client-side templating throwdown: mustache, handlebars, dust.js, and more</a>    </p>
  
  <p>The second of the two posts very nicely answers question 5, but asides from LinkedIn, very few results from Google detail the templating system or imply that it is a popular choice. In addition, the post mentions that they have extended the functionality and hope to one day contribute to the original project. I'm concerned that until they do that, we may also need to extend functionality.</p>
  
  <p>Having said this, LinkedIn's original requirements for a templating system are very close to ours (see below) and they have clearly done some very thorough investigations before choosing.</p></li>
  </ul></li>
  <li><p><em>Our requirements:</em></p>
  
  <ol>
  <li><a href="http://en.wikipedia.org/wiki/Don%27t_repeat_yourself" rel="nofollow noreferrer">DRY</a>: We ideally want to use the templating system on the server (Java based) and client-side, or just client-side if we opt for LinkedIn's complete approach; <em><code>Instead of using a JSP, GSP, or ERB to assemble a page server side and send back HTML, we have the server send back just the dynamic data as JSON and have the page assembled in the browser using a static client-side template served from a CDN"</code></em> </li>
  <li>Fully internationalised</li>
  <li>Good community support</li>
  <li>Sufficiency easy to use / pick up</li>
  <li>Works happily with <a href="http://jquery.com/" rel="nofollow noreferrer">jQuery</a> and <a href="http://documentcloud.github.com/backbone/" rel="nofollow noreferrer">Backbone.js</a></li>
  <li>Well documented</li>
  </ol></li>
  </ul>