

Jaml: Haml in Javascript - mcantelon
http://github.com/edspencer/jaml

======
aconbere
I don't know if I'm the only one who finds this pattern of acting on the
string representation of the function as being a bit distressing.

One the one hand it's a bit like using macros, on the other, there's clearly
no first class support for it in the language, and the possibilities for
breaking things horribly when your best tools are regexen seems high.

~~~
jeremyw
You're not the only one. This is an html builder library for Javascript, with
very little to do with Haml.

------
judofyr
Haml? Looks more like Markaby-inspired to me.

~~~
EvilTrout
Agreed. It's based on nested method calls as opposed to a tab-indented markup
language. It's not really appropriate to call it Haml in Javascript at all.

------
dasil003
Dan Webb invented this in 2006, it's called Low Pro:

[http://www.danwebb.net/2006/9/3/low-pro-unobtrusive-
scriptin...](http://www.danwebb.net/2006/9/3/low-pro-unobtrusive-scripting-
for-prototype)

~~~
dasil003
Dear driveby downvoter: did you even look at the syntax for Low Pro? It's
exactly the same except it uses a $ so as not to pollute the primary
namespace.

------
bradgessler
jaml + node.js + couchdb could make for an interesting web framework.

------
ed
Nice! Looks like DOMPlate, Firebug's internal template system.

[http://www.softwareishard.com/blog/firebug-
tutorial/extendin...](http://www.softwareishard.com/blog/firebug-
tutorial/extending-firebug-domplate-part-v/)

------
AndrewO
The fact that templates are functions that use actual parameters (rather than
backdoor means like instance variables) looks to be a huge win for me.

------
fixie
There is also baconl <http://github.com/cohitre/baconl>

------
epe
Why "cls" instead of "className"?

~~~
ionfish
All programmers go through a phase of employing excessive brevity.

------
redact207
i've used jTemplates (jquery plugin: <http://jtemplates.tpython.com/>) which
is far easier to maintain, as it's much closer to html templating than this

------
Raphael
AppJet had this, except the tag functions were all caps.

