About bem-xjst
What is bem-xjst?
bem-xjst is a template engine for web development using the BEM methodology.
It contains two engines:
BEMHTML — for transforming BEMJSON to HTML.
BEMTREE — for transforming BEMJSON with data to BEMJSON with a BEM tree for further transformation using BEMHTML.
The template engine is based on the declarative principles of XSLT (eXtensible Stylesheet Language Transformations). The name XJST (eXtensible JavaScript Transformations) was also created as an analogy to XSLT.
Before using the template engine, you should review:
Features
Templates are extensible: they can be redefined or extended.
Templates are written using pattern matching for the values and structure of input data.
Traverses input data by default.
Built-in rendering behavior is used by default, even if the user didn’t add templates.
Written in JavaScript, so the entire JavaScript infrastructure is available for checking code quality and conforming to best practices.
Doesn’t require compiling templates.
API provided for adding templates in runtime.
Runs on a server and client.
Read next: Quick Start