4 ms·
Jaml: Haml in Javascript
- bradgessler 17y agojaml + node.js + couchdb could make for an interesting web framework.
- aconbere 17y agoI 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 17y agoYou're not the only one. This is an html builder library for Javascript, with very little to do with Haml.
- judofyr 17y agoHaml? Looks more like Markaby-inspired to me.
- EvilTrout 17y agoAgreed. 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.
- epe 17y agoWhy "cls" instead of "className"?
- ionfish 17y agoAll programmers go through a phase of employing excessive brevity.
- redact207 17y agoi've used jTemplates (jquery plugin: http://jtemplates.tpython.com/ http://jtemplates.tpython.com/) which is far easier to maintain, as it's much closer to html templating than this
- AndrewO 17y agoThe fact that templates are functions that use actual parameters (rather than backdoor means like instance variables) looks to be a huge win for me.
- Raphael 17y agoAppJet had this, except the tag functions were all caps.
- fixie 17y agoThere is also baconl http://github.com/cohitre/baconl http://github.com/cohitre/baconl
- ed 17y agoNice! Looks like DOMPlate, Firebug's internal template system. http://www.softwareishard.com/blog/firebug-tutorial/extending-firebug-domplate-part-v/ http://www.softwareishard.com/blog/firebug-tutorial/extendin...
- dasil003 17y agoDan Webb invented this in 2006, it's called Low Pro: http://www.danwebb.net/2006/9/3/low-pro-unobtrusive-scripting-for-prototype http://www.danwebb.net/2006/9/3/low-pro-unobtrusive-scriptin...
- dasil003 17y agoDear 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.