Template engine usage statistics

266 views
Skip to first unread message

Samuel Neff

unread,
Jul 13, 2013, 1:03:21 PM7/13/13
to nod...@googlegroups.com
I'm deciding on a template engine to use for a simple first Node.js site and am curious if there are any usage statistics anywhere.  I searched and didn't find any.

I've seen performance statistics but don't feel they're relevant since I don't expect templating to be a bottleneck.  I've compared features and have preferences, but I also don't want to use a template engine that is rarely used by others and thus may die out.  The only type of quantitative statistics I've found are github commits and contributors.  Is there something else available?

Thanks,

Sam

Jean-Michel Hiver

unread,
Jul 13, 2013, 3:26:43 PM7/13/13
to nod...@googlegroups.com
plug( {shameless: true} );

I invite you to try and test probably the least used template engine (since i just released it a few days ago) - template-tal. Well, while the module itself is not very popular, TAL a clean and relatively known templating specification.


Let me know if you have issues or questions, i need testers!

Cheers
JM

mark prades

unread,
Jul 13, 2013, 4:55:14 PM7/13/13
to nod...@googlegroups.com
I dont know about stat but i'm using swig ( like twig and jinja ).
It supports template inheritance.
I like jade ,but try to make designers learn and work with jade ... that's not possible at all.
With swig , i get some html and then make templates out if it.

Search for swig on Github.

Alex Kocharin

unread,
Jul 14, 2013, 3:20:05 AM7/14/13
to nod...@googlegroups.com

There is an amount of stars in github and an amount of downloads in npm repository, so yes it is available.

Oleg Slobodskoi

unread,
Jul 14, 2013, 5:58:05 AM7/14/13
to nod...@googlegroups.com
Hi,

1. html becomes difficult to read, because of too long lines. Tal makes lines much longer.
2. You should at least use an html parser ....

Best,
Oleg

--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
 
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Jean-Michel Hiver

unread,
Jul 14, 2013, 6:11:04 AM7/14/13
to nod...@googlegroups.com, ole...@googlemail.com


Le dimanche 14 juillet 2013 13:58:05 UTC+4, Oleg Slobodskoi a écrit :
Hi,

1. html becomes difficult to read, because of too long lines. Tal makes lines much longer.

That's true, but then you split with new lines, i.e.

   <p tal:condition="true:somecondition"
        tal:repeat="item self.someObject.someMethod()"
        ral:replace="self.item.content">Stuff</p>

Personally I find Mustache / Handlebars / ejs syntax horrendous, so it's all a matter of taste.


 
2. You should at least use an html parser ....

HTML parser won't work for anything but HTML. This is meant as a generic library. Plus you can run it on the client side without any dependancies, which is the point... what's wrong with shallow XML parsing? It works...

j...@team9.com.au

unread,
Jul 14, 2013, 11:55:53 PM7/14/13
to nod...@googlegroups.com
I haven't seen usage statistics but for what it's worth (non-quantitative but a personal view) there are several you can probably trust to stay around if you have a look at who's behind them...

My favourite is Jade by visionmedia / TJ Holowaychuk - the same guy behind Express. EJS is more 'traditional' and also a visionmedia project.

I seriously doubt these are rarely used or in danger of dying out if you look at the support they have (popularity of github projects, plugins for IDEs, etc)

Swig also seems very good and broadly used, based on the very popular django templates syntax...

The other suggestion I have is that some template engines support similar syntax and features (e.g. Jade is similar to HAML, Swig is a port of Django templates, Handlebars uses the same syntax as Mustache, etc.) so you could pick a popular syntax and, if your engine of choice falls behind in the future, there may be a compatible alternative you can switch to without too much trouble.

Finally there's a good list here - http://paularmstrong.github.io/node-templates/ - by Paul Armstrong, who's behind the swig project.

Hope this helps.

Ken

unread,
Jul 15, 2013, 1:32:25 PM7/15/13
to nod...@googlegroups.com
This isn't directly responsive to your question of usage statistics, but I really like one of the top performers, doT.  It is short (~125 lines of code), dependency free, very fast, and easy to customize with whatever delimiters you like ({{ }}, <% %>, etc.), allowing for relatively easy transition to/from whatever other template engines you're familiar with so you won't suffer much lock in from choosing it.

Nathan White

unread,
Jul 15, 2013, 3:17:22 PM7/15/13
to nod...@googlegroups.com, nod...@googlegroups.com


On Jul 13, 2013, at 2:55 PM, mark prades <parais...@gmail.com> wrote:

I dont know about stat but i'm using swig ( like twig and jinja ).
It supports template inheritance.
I like jade ,but try to make designers learn and work with jade ... that's not possible at all.


I've found the opposite. If you tell them to think about it as indented CSS selectors they love it.

Also html2jade works great if the work is in complete isolation


With swig , i get some html and then make templates out if it.

Search for swig on Github.

--
Reply all
Reply to author
Forward
0 new messages