When comparing Pure.js vs XSLT in-browser implementation, the Slant community recommends Pure.js for most people. In the question“What are the best JavaScript templating engines?” Pure.js is ranked 28th while XSLT in-browser implementation is ranked 31st. The most important reason people chose Pure.js is:
If a Javascript library is available in the page when it's loaded, Pure will automatically extend it to use it inside the templates.
Ranked in these QuestionsQuestion Ranking
Pros
Pro Automatically extends JavaScript libraries available
If a Javascript library is available in the page when it's loaded, Pure will automatically extend it to use it inside the templates.
Pro Permits pipelining
I.e. apply one template on top of another.
Pro AOP model
With ability to split feature implementation apart from main codebase, development became quite more manageable. Example: for data of particular type you could define own rendering or render refine rules; pipelining allows incrementally change UI by adding/removing elements depend of parameters, data values, previously rendered content.
Pro Native multithreaded implementation
Only template engine which utilizes multithreading.
Pro Native pre-compilation available
In some browsers(IE) XSLT during load is compiled into DLL. In others pre-loaded template allows to skip recurring parsing .
Pro Accept native data out of JS heap
XML when stored, saved outside of JS heap, capable to work with amount of data 100x larger of JSON.
Pro Native implementation
Supported in all browsers, starting from IE5.
Pro Server side rendering
XSLT is available as in browser as on server side via various libs including highly optimized for CPU.
Cons
Con Injection not explicit in template
Looking at the template, we cannot see where content will be injected. Instead, all we see are empty tags.
Con Not enough separation
The controller knows too much about the template.
Con Not many reasources outside the official documentation
PureJS is not very popular and it's not used by many. Because of this, there are not many guides or tutorials out there for Pure.js other than the official documentation.
Con Lack of SDLC for in-browser development
It will take time to collect complete gentleman set: debugging, modular development, documenting, unit tests, etc. Please share if know the book on subject.
Con Verbose syntax
Takes time to get used to.
Con AOP model
Is complex to comprehend, justifiable on complex projects.