Ranked in these QuestionsQuestion Ranking
Pro Clean syntax
Pro Easy to read, powerful mixins
Jade supports mixins. These not only make your templating job easier but are also super-easy to read.
Pro Identation reflects nesting
With Jade you can quickly overview the hierarchy of a template.
Pro Easy sublayouts using block and extends
By using the extends and block keywords, sublayouts can be made with intuitive syntax.
Pro High performance on the server and client side
Apart from their functionality all template engines need to be efficient in terms of the time they require to render a page. Jade beats most of its competitors in this area, it is highly optimized to deliver good performance on both the server and client ends.
Pro Reuse code in other languages
Pro Preprocessor support
Filters make it easy to embed compiled languages such as coffeescript or markdown directly into the template. A filter will allow you to keep your inline code and content consistent with the rest of your codebase so you can continue using your prefered language with your outputted HTML.
Pro Interactive documentation
There's an interactive documentation available here that allows you to play around with code examples and watch the results in real time.
Pro Use Markdown for readable markup
Jade is awesome at templating structural markup, but that's not all Jade is awesome at. It also allows you to use markdown within your template itself which will render to a beautiful HTML page.
EJS uses all the JS jargon and logic, so if you're proficient in JS, you can use EJS right away.
Pro Consistently scores rather well in benchmarks
According to some benchmark tests, EJS is way faster than Jade or Haml.
Pro Same language before and after rendering
Your html/text remains pretty much the same before and after rendering. EJS filters out and performs its functions on any occurrences of its own
<%= %> tags in your template.
Pro Powerful error handling
EJS has a really smart error handling mechanism built right into it. It points out to you, the line numbers on which an error has occurred, so that you don't end up looking through the whole template file wasting your time in searching for bugs.
Con Cannot copy/paste examples from the internet
Examples from CSS frameworks like Bootstrap are never utilizing the Pug syntax, which means that you cannot ever copy/paste something to quickly see how it would look or if it works. You would have to convert the HTML to Pug first.
Con Unforgiving in case of indentation errors
The structure is entirely determined by the indentation. That means that indentation errors will ruin the end result, often without an easy way to find the error. Indentation errors are easily introduced by copy-pasting, by rearranging code and by working in a team where not everyone uses the same indentation style. (E.g tabs vs. spaces.)
Con Bad performance
Bad sintaxe (Short-hand HTML) and bad performance. No streaming or asynchronous calls. https://github.com/mauricionobrega/nodejs-template-benchmark
Con Performance is not great compared to other popular templating engines
Con No support for block by default
EJS has no support for the
block functionality which allows you to reuse pieces of templates across different files. Although it can be added to EJS through a third-party library.
Con Cryptic syntax