8 ms·
Announcing Handlebars.js (A Mustache Superset)
- liamk 16y agoTo be a core-contributor to both rails and jquery seems very impressive -- switching between the two projects must be difficult?
- miketaylr 16y agohttp://github.com/getify/HandlebarJS http://github.com/getify/HandlebarJS oops!
- wycats 16y agoYipes. Maybe I can take solace in the fact that mine is "handlebars.js" (plural)?
- rue 16y agoOne could, at a minimum, do a Github search before naming their project.
- steveklabnik 16y agoOne of them is even an extension of Mustache: http://github.com/leeoniya/handlebar.js http://github.com/leeoniya/handlebar.js Naming projects is the worst.
- deleted 16y ago[deleted]
- grandalf 16y agoWhat's the saying again... any time you start building a template engine you'll end up inventing django templates... ? This looks great. I love mustache and use it on one of my projects. A bit more added syntax power would be nice, but it could easily begin to violate the rule of not being code.
- wycats 16y agoOne of my guiding principles with Handlebars was explicitly to avoid adding any new features in the template itself that were not ways to reference a part of the JS. Normal Mustache gives you one simple way to reference a key in the current context--handlebars adds an extended path syntax and a mechanism for passing a context to lambdas (which already exist in Mustache).
- grandalf 16y agoInteresting. I'd actually like to see Mustache go in the direction of being a bit more like django templates by adding filters, which I think are no more likely to confuse a designer than plain old mustache tags.
- tchvil 16y agoWhen I started to build "my" template engine, I took a total different route than django template. I wanted the HTML and the logic(javascript) strictly separated. The designer can build and maintain the HTML while the developer can write JS code. It is called PURE http://beebole.com/pure http://beebole.com/pure
- judofyr 16y agoHeh, I've already used the name Handlebars for a Mustache-related project: http://github.com/judofyr/handlebars http://github.com/judofyr/handlebars. It's basically a JIT for Mustache which speeds up rendering. Nobody uses it, though, so I don't mind. BTW: I've written major parts of the current Mustache implementation, do you want some help on a Ruby port?
- wycats 16y agoThat'd be great. Can you email me? (wycats@gmail.com)
- pbiggar 16y agoCan I ask why you created a new project rather than contributing back to mustache?