mwunsch/handlebars.scala — pull request #39 by timcharper (2014-06-02 17:08:06+00:00)
Title: PATCH BOMB: Scala 2.11 cross compile, separate data Binding concerns from Context

This is a big one!

I've taken care to make the tests pass with each patch, so each incremental change can be independently evaluated.

I've also simplified the ContextFactory, quite drastically. I think the different factory concerns are a data-binding. I haven't implement caching quite the way it was implemented before, but it *SHOULD* be thread-safe as there is not any use of the Scala 2.10 experimental reflection library.

I've done a big push to remove data binding concerns from Context, Visitor, and the Helper routines. It's not 100% there, but this restructuring is a big step; existing external API behavior has been preserved as specified by the tests.

Why all this work? My goal is to use handlebars in a much more type-safe way. I'd like to plug in a play-json binding and render my handlebars partials using JSON AST data. With data-binding tightly coupled to view, helper, visitor, this was impossible. Now, it's within reach.

Please consider accepting these changes. I'm happy to continue collaborating to push it over the line so we can release handlebars-play-json.