Which templating is the best or very much acceptable by Node.js developer community? Right now I am in confusion whether to study Jade, EJS or stylus.
Please help.
Some more information:
In template engine benchmark jade is on the last place.
But it's an old benchmark and I like Jade. It's like a template engine and a html preprocessor in one package and so my favorite.
PS: Jade has renamed to pug and pug is under active development for a v2 release.
I recommend you to use Handlebars or Jade.
If you want to use the same template files for both server and client, Handlebars is the best choice, because its syntax is very friendly with many client-side frameworks/libraries such as Angular, Aurelia, RactiveJS, etc.
With Jade, you will love it if you want to handle the complex logics of view from server side. It's also fast and clean.
When I have to make a decision like this there are a few things I do.
First, narrow the field a bit by looking at the projects themselves.
Find their GitHub project (or wherever they are hosted). When was the last commit? If it's months, is there activity in other branches? If there is none, is it feature complete? Take a look at the project issues and pull requests to get an idea of the kinds of problems people are having. Does the project have lots of contributors? Have many people starred it? These are a good indication of a projects popularity and its acceptance by the community in general. Also do a Google search for "<project name> issue" (or problem, or other words that might be appropriate for someone having issues with that project - perhaps "syntax" and "parse" might be good additions for a template engine). Be sure to check Stack Overflow too. You'd be surprised how much you can learn about a project at this point without actually having used it yet.
Then, once I've got a shorter list I'll narrow them down if I need to by features - do any of the projects have any unique features I could make use of? Are there any glaring omissions?
Finally, I'll try them out in turn, starting with a simple contrived mini project that exposes some of its features. It's worth seeing this process through to the end and trying all the options.
You may find the following discussion interesting :
hashnode.com/post/which-one-is-the-templating-eng…
It's a poll and looks like Jade is winning. I once tried EJS, but for large scale projects I won't recommend it. Jade is good, but you need to wrap your head around the indentation thingy.
Cliff Rowley
Thinker, Tinkererer, Dork.
Rajkumar
Fullstack Developer.
Well it looks like hard work, but if you are going to write traffic heavy sites, I find this useful. I've done if for few projects and it worked like charm.
But for simple application, go ahead with any engine which you like!