pug (Jade) vs FLAVE
When comparing pug (Jade) vs FLAVE, the Slant community recommends pug (Jade) for most people. In the question“What are the best JavaScript templating engines?” pug (Jade) is ranked 1st while FLAVE is ranked 23rd. The most important reason people chose pug (Jade) is:
One of the distinguishing features of Jade is its clean syntax. Elements are created with CSS selector syntax which makes the template consistent with your style sheet and JavaScript element selector library.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Clean syntax
One of the distinguishing features of Jade is its clean syntax. Elements are created with CSS selector syntax which makes the template consistent with your style sheet and JavaScript element selector library.
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 Logic done in JavaScript
The logic in Jade is done with native JavaScript. This means there's less of a learning curve and it'll be easier to get other developers up to speed.
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 Compiles to JavaScript
Jade compiles to a JavaScript function that produces the ultimate output. This interim format makes it useful for embedding in conditions where you're trying to save space or decrease processing requirements.
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 Allows writing inline JavaScript
Jade allows embedding regular JavaScript code directly within the template.
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 Reuse code in other languages
In addition to JavaScript, you can reuse Jade templates in Scala, PHP, Ruby, Python and Java.
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.
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 Syntax Highlighting
Syntax Highlighting extensions for Atom and VSCODE
Pro JavaScript allowed in views
Pro Helper functions
Can write pure JavaScript helper functions to include in the view file.
Pro Multiple Templates in a single file
Optionally encapsulate views within a class as well as have as many view as you want.
Pro Not white space sensitive
Cons
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 Limited support and testing
Con No data binding
Flave only generates HTML.