Hi, I like the Thymol project. I'm using thymeleaf in the backend and it will be nice to utilize it also in frontend. I will be nice to have thymol to replace BackboneJS's Templating engine. Any hints how to do such a integation? I suppose it must be done on BackboneJS level. Thanks
Using Thymol in conjunction with Thymeleaf 2.X should be easy, all you should have to do is to take care with the namespaces.
It would be easiest if you use one namespace for attributes that should be processed by Thymeleaf and another for those to be processed by Thymol.
If you're using XHTML, simply set the value of thPrefix accordingly. If you're using HTML5-style attributes, use an appropriate combination of values for thPrefix and thDataPrefix.
I must admit to knowing very little about Backbone, but it appears that the out-of-the-box system uses Underscore's templating facilities and excluding Underscore isn't an option as it's a required dependency.
Also, Thymol is usually used so that it instantiates templates implicitly as it parses and processes Thymeleaf/Thymol attributes within a template hierarchy.
Currently there is no API for instantiating (Thymol) templates explicitly as Backbone does.
So I don't think you'll be able to replace Backbone's templating system with Thymol as such.
You may however encounter problems with order of loading and/or processing.
My advice is to create a simple prototype, use the usual Thymol script load, add a data-thymol-load script to set things up and early in that script call "ThUtils.loadScript(<script url>)" for underscore.js and backbone.js. Then proceed to define a simple example using the most basic constructs, and see how they hang together.
Please post back your findings, I will help with any problems you come across as best I can.