JavaScript templates

  • Revision slug: JavaScript_templates
  • Revision title: JavaScript templates
  • Revision id: 63314
  • Created:
  • Creator: Vflash
  • Is current revision? No
  • Comment 1 words added, 1 words removed

Revision Content

An alternative approach to XUL's own templating system, is to use JavaScript templates.

This approach also provides a separation of formatting and structure from content, but relies on a JavaScript templating engine to have JavaScript-side business logic inject content into a template. And this does not require any use of RDF/XML, etc.

Example implementations

Revision Source

<p>An alternative approach to XUL's own templating system, is to use JavaScript templates.</p>
<p>This approach also provides a separation of formatting and structure from content, but relies on a JavaScript templating engine to have JavaScript-side business logic inject content into a template. And this does not require any use of RDF/XML, etc.</p>
<h3 name="Example_implementations">Example implementations</h3>
<ul> <li><a class="external" href="http://code.google.com/p/trimpath/wiki/JavaScriptTemplates">JavaScriptTemplates</a></li> <li><a class="external" href="http://code.google.com/p/jsmarty/">JSmarty</a> (a system based apparently more closely on <a class="external" href="http://smarty.php.net/manual/en">Smarty</a>, with many more functions, and with more recent contributions)</li> <li><a class="external" href="http://www.balupton.com/sandbox/jquery_smarty/">jQSmarty: jQuery Smarty Plugin</a> (introduced <a class="external" href="http://www.phpinsider.com/smarty-forum/viewtopic.php?p=47804">here</a>)</li> <li><a class="external" href="http://github.com/bard/seethrough_js/wikis" title="http://github.com/bard/seethrough_js/wikis">Seethrough</a> (uses <a href="/E4X" title="E4X">E4X</a> with namespaced attributes and elements)</li> <li><a href="/en/E4X_for_templating" title="En/E4X for templating">E4X for templating</a><a href="/E4X_for_templating" title="E4X for templating"><br> </a></li> <li><a class="external" href="http://ejohn.org/blog/javascript-micro-templating/" title="ejohn.org">JavaScript Micro-Templating</a> syntax similar to (asp|jsp|php)</li> <li><a class="external" href="http://blog.markturansky.com/BetterJavascriptTemplates.html">BetterJavascriptTemplates</a></li> <li><a class="external" href="http://embeddedjs.com/">EJS (Embedded JS)</a></li> <li><a class="external" href="http://johannburkard.de/software/xsltjs/">XSLTJS</a> (for cross-browser use of XSL for templates)</li> <li><a class="external" href="http://jsonml.org/BST/">JSONML Browser-Side Templates</a></li> <li><a class="external" href="http://jsrepeater.devprog.com/">JS Repeater</a></li> <li><a class="external" href="http://beebole.com/pure/">PURE</a></li> <li><a class="external" href="http://www.javascriptr.com/2008/06/05/purejstemplate-a-pure-javascript-templating-engine-for-jquery/">PureJSTemplate</a></li> <li><a class="external" href="http://labs.adobe.com/technologies/spry/samples/data_region/AttributeComboSample.html">Adobe Spry processing instruction attributes</a></li> <li><a class="external" href="http://plugins.jquery.com/project/jquerytemplate">Templates in JQuery</a></li> <li><a class="external" href="http://www.prototypejs.org/api/template">Templates in Prototype</a></li> <li><a class="external" href="http://extjs.com/learn/Tutorial:Getting_Started_with_Templates">Templates in ExtJS</a></li> <li><a class="external" href="http://zealdev.wordpress.com/2008/02/22/mootools-template-engine-a-new-approach/">Mootools Template Engine</a></li> <li><a class="external" href="http://wiki.github.com/raid-ox/chain.js">Chain.js</a></li> <li><a class="external" href="http://mjtemplate.org/" title="http://mjtemplate.org/">Mjt</a></li> <li><a class="external" href="http://code.google.com/p/mjst/" title="http://code.google.com/p/mjst/">mjst</a></li> <li><a class="external" href="http://vflash.ru/rr2jquery/?mdc" title="http://vflash.ru/rr2jquery/?mdc">domMaster</a><span class="external"> and nodejs <a class="link-https" href="https://github.com/flash/master_texthtml" title="https://github.com/flash/master_texthtml">master_texthtml</a></span></li> <li><a class="link-https" href="https://github.com/janl/mustache.js" title="https://github.com/janl/mustache.js">mustache</a> (thanks to janl)</li> <li><a class="link-https" href="https://github.com/mrharel/babajs" title="https://github.com/mrharel/babajs">BabaJS</a></li>
</ul>
Revert to this revision