C
C
Cyril2017-02-24 21:08:41
Node.js
Cyril, 2017-02-24 21:08:41

Which templating engine to choose for an Express application?

When generating an Express application skeleton using express-generator , I can choose the type of templating engine from the list: ejs, hbs, hjs, jade, pug, twig, vash .
What is usually the most convenient to use? I heard that Pug (ex-Jade) is good and simple, and Handlebars is too sophisticated. But what about rendering speed?
Help make a choice. Thanks

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dima Pautov, 2017-02-24
@bootd

And why is Handlebars tricky then?
If divided into templates, then I use it. Once I studied ember.js, so I fell in love with hbs. I didn't see anything wrong with him.

K
Konstantin Kitmanov, 2017-02-24
@k12th

In terms of rendering speed, everything is compiled on the first call, and then the difference is negligible. I'm for pug, then you won't want anything else.
PS Let me explain, pug is not only a powerful template engine with block inheritance, includes and macros, it is even cleaner and easier to write syntax.

I
Ivan, 2017-02-25
@LiguidCool

Is hbs tricky compared to jade? lol maybe the other way around? :)
I love hbs, and used it even without a node, in a browser for a simple SPA. It is somewhat similar to native JS or a PHP templating engine.
But in fact, don't listen to me - just try hello world on each option and you will understand what is closer to you.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question