meteor icon indicating copy to clipboard operation
meteor copied to clipboard

`Handlebars.registerHelper` is a hack?

Open bminer opened this issue 13 years ago • 6 comments

Helpers are more of a Template concept, not specific to Handlebars, correct? Can this be corrected so that other template engines can be integrated with Meteor?

Any thoughts/suggestions for this issue?

bminer avatar Mar 08 '13 21:03 bminer

Blake, yes, this is definitely something that we need to do, though it's going to be a fairly big/invasive change. @dgreensp and I are making some enhancements to helpers as part of our work on the controllers branch (for easy forms/UI components) and will keep this in mind, though it's unlikely that we will fully solve it in this pass.

gschmidt avatar Mar 14 '13 21:03 gschmidt

Thoughts on this issue... it's been a while since the last commit to controllers branch?

bminer avatar Jun 21 '13 13:06 bminer

Hey Blake! The reason you haven't seen commits on controllers is that that work has been subsumed into @dgreensp's next-generation Spark rewrite. So now the action is happening on the shark branch!

gschmidt avatar Jun 26 '13 02:06 gschmidt

@gschmidt - Awesome. Thanks for the update!

@dgreensp - Dave -- if you need any help from me, please hit me up!

Thanks, guys.

bminer avatar Jun 26 '13 13:06 bminer

The nature of helpers will shift so that they are more tied to "Components" than templates. Conceptually, a component is roughly a template plus a controller (with some view-model state).

We still want to support multiple styles of template language in the long term, including a Jade-like one, but it's taken us a while to get to the proper way of doing so. While Spark used strings as the interface with the template engine, the new rendering system has an HTML rendering API that the template language must target. This API allows Meteor to perform fine-grained reactive changes to the DOM rather than re-rendering entire templates. This API won't be documented before 1.0, but it should finally allow multiple first-class template languages on Meteor, at the expense of supporting existing template engine implementations.

Closing this issue.

dgreensp avatar Sep 26 '13 18:09 dgreensp

Spark was cool, so I'm looking forward to what you guys come up with. In the meantime, I will probably postpone Blade + Meteor integration until the APIs are more frozen.

bminer avatar Oct 09 '13 16:10 bminer