A comprehensive comparison of front-end templating solutions
Templating is a technology that help us to represent data in different forms.
In the old days, choosing a appropriate template engine for client templating is not easy, beacuse you were left with little other choice. Nowadays, choosing templating engine is still a big probelm, beacuse there are so many template engines and most of them seems do nothing different(Template-Engine-Chooser! comes).
In this article, from a principle perspective ,we will have A comprehensive comparison of front-end templating solutions. there are some distinct types of solution that will be mentioned.
- String-based templating (String-based parser & compiler)
- Dom-based templating (Dom-based link & compiler)
- Living templating (combine String-based parser with Dom-based compiler)
- Other: Coffeekup: Inner DSL based on coffeescript syntax
The article won’t take the fourth type into detail, except for React. But you will find that react is very similiar with Living templating. beacuse all them is compeletely independent with innerHTML
.
Before diving into detail, let’s talking about innerHTML
first.