Template Engine: A flexible Template Engine with client & server mode
Your front-end templates should be able to get rendered both in your server or in JavaScript (or TypeScript) without pain. So the last banner template you did for the home page can be easily re-used for an overlay appearing before the visitor exits the page.
Also, a template engine with a minimum capacity for processing logic (e.g.: formatting strings, conditional parameters, etc.) will facilitate your templates to have the required rendering logic built-in, avoiding the need to have any business logic in your code between the call of Boxalino Narrative API and the rendering in your view.
In addition, Boxalino Template Engines can access directly to your Template Library and manage the displays of overlays throughout the page visit (scroll-behavior, minimum time on page, pause to look at something, etc.) and automate the triggering of calls to Boxalino Narrative API without that you have to program anything while making direct usage of all the templates you have created for your front-end.
Learn more about how a Template Engine is a key part of your future front-end architecture here: Our Best Practice for your New Front-End
Nunjucks
Seems like a quite good engine with a lot of possibilities to create functions and other logic which would make the templates possibly quite autonomous and could therefore be easily re-used as provided (with the required logic inside) for client-side rendering.
https://mozilla.github.io/nunjucks/
Mustache
Nice, but too simplistic as it doesn’t provide any real options to manipulate the data in the rendering (even for simple number formatting).
Handlebars
Same comment as Mustache
Resource
https://colorlib.com/wp/top-templating-engines-for-javascript/
Add Comment