You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Handlebars java, easy things are not easy. There are missing many helpers like for removing whitespaces, logical operators etc. The limited functionality of handlebars is ok in case of concerns separation (model & view layers) but... in a real/dev world when we use Knot.x to just pass the JSON feed data from 3rd party service and render it we need advanced logic in template engine (for now, implement plenty of handlebars helpers) or be forced to manipulate 3rd party service response before passing it to template engine which could cause more poor performance in case of need to buffer response, map feed objects to pojos etc.
Without a need to transform 3rd party responses and into desired format, such little logic could be covered by more advanced template engine (with var assignments, macros, inheritance and much more built-in helpers) with even better performance like Pebble Template Engine.
in handlebars it is not trivial to introduce new variable which values comes from custom helper to be able to use other helpers to consume a value
to sum up, more ways to cover edge cases in Knot.x templates make reduce costs of integrating 3rd party services and this is main motivation to introduce this issue.
current set of handlebars helpers is not good enough in my opinion. pebble just offers more built-in features and they are well tested. I'd like to avoid using untested helpers (be forced to implement my own for simple scenarios /yes it is ugly truth for now).
The text was updated successfully, but these errors were encountered:
In Handlebars java, easy things are not easy. There are missing many helpers like for removing whitespaces, logical operators etc. The limited functionality of handlebars is ok in case of concerns separation (model & view layers) but... in a real/dev world when we use Knot.x to just pass the JSON feed data from 3rd party service and render it we need advanced logic in template engine (for now, implement plenty of handlebars helpers) or be forced to manipulate 3rd party service response before passing it to template engine which could cause more poor performance in case of need to buffer response, map feed objects to pojos etc.
Without a need to transform 3rd party responses and into desired format, such little logic could be covered by more advanced template engine (with var assignments, macros, inheritance and much more built-in helpers) with even better performance like Pebble Template Engine.
https://github.com/mbosecke/template-benchmark
Rocker is alternative tpl engine with even better performance, but it does not offer such many features like Pebble.
To cover my case, I would like to have an option to write (with no extra pebble extensions needed to be impl):
then
reference:
https://pebbletemplates.io/wiki/tag/for/
https://pebbletemplates.io/wiki/tag/set/
https://pebbletemplates.io/wiki/filter/slice/
in handlebars it is not trivial to introduce new variable which values comes from custom helper to be able to use other helpers to consume a value
to sum up, more ways to cover edge cases in Knot.x templates make reduce costs of integrating 3rd party services and this is main motivation to introduce this issue.
current set of handlebars helpers is not good enough in my opinion. pebble just offers more built-in features and they are well tested. I'd like to avoid using untested helpers (be forced to implement my own for simple scenarios /yes it is ugly truth for now).
The text was updated successfully, but these errors were encountered: