Hi!
First of all, I’m not only targeting mustache, but all template engines using an embedded whatever language (curly bracktes), this goes for client-side as well for server-side (Smarty, Handelbars, Angular, React, Ractive, Twig, Underscore, EJS, Hogan, etc).
Second, I’m not fishing for a separation of concerns answer.
As I see the current state of the art, you either render your templates front-end or back-end for the entire site, but never consider rendering them on both sides. For instance, how do I render my angular template server-side? It however, seems nobody embraces that. Or how do I render my twig template client-side. There’s a js library in the meantime, which brings me to antother point, because they introduce new languages they will always depend on a certain system.
Then, logic-less, what does that even mean? It doesn’t prevent logic at all. And it’s still spaghetti. We should be writting logic-free templates instead!
I belief replacing {{strings}} with other strings is the wrong approach. We are working with html and eventually with the DOM. Yes i know, everybody dislikes the DOM, but we really should be working with nodes instead, and not with curly brackets expressions.
I am currently actually working on my own template engine that approaches what I mentioned above. You can get a glimpse of the api here.
So, why are those template engines so popular? Why arent we still using engines such as pure.js, plates or MTE anymore? Is it simply a lack of promotion, so everybody is following the big corporations?
Thanks!