3 ms·
The earliest templating in this style I'm familiar with is FlyDOM. I made a variant SuperFlyDOM. HAML was around and HAML-JSON was not far off, IBM's JXON, jQ
by doublerebel 14y ago
The earliest templating in this style I'm familiar with is FlyDOM. I made a variant SuperFlyDOM. HAML was around and HAML-JSON was not far off, IBM's JXON, jQuery's DOM creation object shorthand... probably more exist.
It makes a lot of sense compared to the antiquated longhand and inflexibility of XML element declaration. Templating in the browser has been done to death and usually string concatenation is the fastest. However, JS frameworks like Enyo/WebOS and Titanium Mobile use JS element creation, so having a shorthand for those is not significantly slower.
HAML is nice because it removes the computer cruft of braces and brackets, but building JS objects with CoffeeScript is just as quick. IMHO the only reason not to use the actual language is so that less technical UI devs can build the templates.
- lootsauce 14y agototally agree, thanks for listing some of the other similar approaches