A different approach to building DOM
andrewluetgers.com
andrewluetgers.com
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.
"Templating languages are pretty cool because you get to use a declarative language to make some DOM elements. But they either don't give you the full expressiveness of a decent functional language, or they do and it's a bunch of arbitrary stuff stuck in some ugly tags - which I am still way too lazy to learn, when I already have a decent functional language (JavaScript)."
My solution is about the same - https://github.com/pidge/h