title: JavaScript templating
body: <p>I was trying to convince a fellow co-worker into using Mustache/Hogan in the front-end of a project and I proposed the following:</p>
  
  <p>Having a templates.js file, which could roughly look like this:</p>
  
  <pre><code>var tpl_alert = '&lt;div class="alert"&gt;{{msg}}&lt;/div&gt;';
  var tpl_welcome = '&lt;p class="user-{{type}}"&gt;Welcome, {{name}}&lt;/p&gt;';
  ...
  </code></pre>
  
  <p>Then, we would include templates.js and use the corresponding tpl in the Mustache/Hogan.js rendering.</p>
  
  <p>My proposal was turned down, since we're hardcoding html templates into js variables. 
  Is this really that bad? Which are other alternatives to this?</p>