Announcing Handlebars.js (A Mustache Superset)(yehudakatz.com)
yehudakatz.com
Announcing Handlebars.js (A Mustache Superset)
http://yehudakatz.com/2010/09/09/announcing-handlebars-js/
5 comments
That'd be great. Can you email me? ([email protected])
What'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.
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.
One 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).
Interesting. 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.
When 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
Can I ask why you created a new project rather than contributing back to mustache?
[deleted]
Yipes. Maybe I can take solace in the fact that mine is "handlebars.js" (plural)?
One could, at a minimum, do a Github search before naming their project.
One of them is even an extension of Mustache: http://github.com/leeoniya/handlebar.js
Naming projects is the worst.
Naming projects is the worst.
BTW: I've written major parts of the current Mustache implementation, do you want some help on a Ruby port?