JavaScript templates

  • Revision slug: JavaScript_templates
  • Revision title: JavaScript templates
  • Revision id: 63300
  • Created:
  • Creator: Brettz9
  • Is current revision? No
  • Comment 12 words added

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 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>
</ul>
<p> </p>
Revert to this revision