I thought would be nice to have a template engine with the same syntax for both Php and Javascript, I’m thinking about a website which could work on Php only then scale with Javascript, below a list of something that already exist:
So, mustache seems to be most interesting, I’ll give a try sooner or later, in the while I been tempted (still) to write my own, inspired by something simple like JavaScript template engine in just 20 lines and JavaScript Micro-Templating. The target would be a template engine with the same exact syntax for both Php and Javascript, a generator, script or command, which given a template would create a function for both the languages (eventually any language introducing a output backend concept).
Doing some fast test immediately shown an horrific implementation design, Javascript’s (json) objects are unsorted (arrays are sorted).