garann / template-chooser Goto Github PK
View Code? Open in Web Editor NEWTool to help select the right template engine for a project.
Home Page: http://garann.github.com/template-chooser/
Tool to help select the right template engine for a project.
Home Page: http://garann.github.com/template-chooser/
It would be cool to include tempo.js in your list.
Great site
What do I need to do to get my two languages listed.
Great work on this tool, Garann.
Now that Chrome is aggressively pushing Manifest Version 2, lots of templating engines aren't usable in that context. They might be in later versions with explicit whitelisting or inside a sandbox, but these demand extra work.
So I suggest adding the "Chrome CSP Compliant" criteria, which basically means a library never uses eval
, new Function()
and the like. For example, underscore.js doesn't comply while Addy Osmani's fork of Mustache.js does.
This would be really useful for finding template libraries that prevent script injection.
The transparency changing doesn't work in Opera, so the whole chooser is useless without actually seeing any results in Opera 11.62, the current stable version of Opera. There should be at least some fallback for browsers that don't do animation.
These templates use HTML attributes for targeting. So client and server work can be combined since an executed template has the same target markers as the raw one.
https://github.com/leonidas/transparency
https://github.com/profit-strategies/fill
(There's a Java port of fill: https://github.com/Stwissel/jfill)
Hi,
Thanks for the cool site and including Transparency in the comparison!
One question, though. I wonder how the template engine performance is evaluated?
Based on performance tests I've run, transparency should be easily one of the fastest engines on the client side. The server-side is a different story though, as usually string templating is usually a clear win over there.
Here's the tests I've run:
http://jsperf.com/transparency-vs-handlebars-finite-list/8
http://jsperf.com/transparency-vs-handlebars-infinite-list/7
http://jsperf.com/dom-vs-innerhtml-based-templating/366 (kind of naive test, as transparency caches aggressively)
Cheers,
Jarno
Bad news is they do like to document the stuffs in Chinese,
From Tercent
Introduction(Chinese): http://cdc.tencent.com/?p=5723
Home page(Chinese): http://aui.github.io/artTemplate/
GitHub repo(Chinese Readme): https://github.com/aui/artTemplate
Some demos copied:
{{if admin}}
<p>admin</p>
{{else if code > 0}}
<p>master</p>
{{else}}
<p>error!</p>
{{/if}}
{{each list as value index}}
<li>{{index}} - {{value.user}}</li>
{{/each}}
{{include 'template_name'}}
{{time | dateFormat:'yyyy-MM-dd hh:mm:ss'}}
An image from 2012.6 on performance:
From Taobao
Home page(Chinese): http://juicer.name/
Docs(English): http://juicer.name/docs/docs.html
Introduction(Chinese): http://ued.taobao.org/blog/2012/04/juicer-一个javascript模板引擎的实现和优化/
GitHub repo(Chinese): https://github.com/PaulGuo/Juicer/
An image from 2012.4 on performance:
Some demos:
{@each list as item}
${item.prop}
{@/each}
{@each list as item,index}
{@if index===3}
the index is 3, the value is ${item.prop}
{@else if index === 4}
the index is 4, the value is ${item.prop}
{@else}
the index is not 3, the value is ${item.prop}
{@/if}
{@/each}
{@each i in range(5, 10)}
${i}; //输出 5;6;7;8;9;
{@/each}
<script id="tpl" type="text/template">
<ul>
{@each list as it,index}
<li>${it.name} (index: ${index})</li>
{@/each}
{@each blah as it}
<li>
num: ${it.num} <br />
{@if it.num==3}
{@each it.inner as it2}
${it2.time} <br />
{@/each}
{@/if}
</li>
{@/each}
</ul>
</script>
Swig is quite a worthy JavaScript template solution. Is it possible to add this to the list?
see more at:
https://github.com/getify/grips
I believe that every creator of a template engine should give this information and this should be reflected here.
Right now I have to provide compatibility to some old IE and I don't want to start implementing my templates and realise that it does not work for old browsers.
Thank you for your site :)
EJS does not provide for HTML escaping (let alone as a default), which means it is subject to the most common security hole in modern programming. It should be removed or at least strongly caveated.
Used your site to discover a few different templating engines, ended up going with JSTE, which isn't on the list.
JSTE is a serverside templating language that embeds Rhino ( java implementation of javascript ) into a JSP-like syntax.
Example code:
<% for (var i=0; i<3; i++) { %>This is printed three times<% } %>
This is the value of the variable: <%= variable %>
Putting this here in case I'm not the only one who thinks the criteria items are hard to read, the font choice has a very narrow letter spacing I think, and the shadows and All-caps (also from font) are not making it any better.
Thanks.
Hi,
this is just a request (no hard feelings if it is not granted)
to include a template engine of mine Contemplate
Thanks
Set "Do you need partials?" to "Yes" and then "No". The list doesn't update to show all the templates.
If I accidently choose an answer in a question, how do I remove it? Select other options is not really helpful in this situation.
Hi,
I would be really thankful if you add XJade to the list.
It was opensourced and released only few weeks ago so it's not widely used yet.
Althought this should disqualified it, here are main reasons why you should consider make an exception this time:
XJade is much different from other engines, it has potential to be the one on client side and almost no one now about it for now. Please tell me what you think about it and help me with propagation. Thanks.
Would love to know which ones have typescript .d.ts
files available.
I heard Thunder templates are blazing fast:
https://github.com/dreamerslab/thunder
I would be nice to have it in template chooser.
Link with more details: http://aefxx.com/
It's pretty decent, ended up choosing it over handlebars. Here's my comparison, along with dust.js:
https://docs.google.com/document/d/15ln-DLS6ENFgRdnQJ-I1Ku9HMYwDvbvxnl-p761geTI/edit?usp=drive_web
The question: "Does it need to be one of the very fastest?" provides no way to follow up and verify the claim. It would be helpful if you either directed the user to how the ranking was generated, or where we can find the rankings you used.
I'd love to put together a pull request to add Teacup but looks like this project hasn't changed in months. Anyone home?
jsRender has a great performance and is considered jQuery's tmpl replacement.
After choosing something and changing a later or previous selection it doesn't update as it should
please add template.js https://github.com/yanhaijing/template.js
Seems to have no mention of KnockoutJS.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.