3 ms·
I agree completely, which is what I did with my own binding library (which is supposedly going to be open-sourced in early 2015). The templating language is HTM
by Tloewald 12y ago
I agree completely, which is what I did with my own binding library (which is supposedly going to be open-sourced in early 2015). The templating language is HTML (which can be viewed and styled normally) with a few custom data- attributes, the logic is Javascript. No extra silly half-assed languages to learn (aren't HTML, CSS, and Javascript enough?). The entire library is under 7kB minified (less gzipped) and does one-way (read-only) and two-way (live-updated) binding without changing the underlying object.
To bind an object to a chunk of DOM (it leverages jQuery) you simple do something like $(selector).bindomatic(object) and you're done. (If you need additional logic, you pass it on the side in an options object.)