Join GitHub today
TodoMVC with Bacon.js, Backbone.js and Transparency.js #419
Hi, I implemented TodoMVC with a following stack:
Backbone models and collections are pretty awesome. However, Backbone views don't give you a much. Furthermore, both views and models rely on event handler pattern, which isn't really composable, e.g., when creating a new todo, one needs handle all key presses and check if the key is
Additionally, it's difficult to avoid mutable and often global state with callbacks. E.g., in the original Backbone example,
Bacon.js (and FRP in general) lets one to compose fine-grained event streams and properties, and compose new streams on top of them with filter, combine and other "list processing" functions. Furthermore, global state can often avoided, as views can easily compose local properties, e.g., TodoApp.filteredList.
Finally, in order to pull things together, I wrote a small Backbone.EventStreams plugin, which wraps all Backbone.Event sources as Bacon.EventStreams. With the plugin, one can mix DOM events with Backbone events.
Thanks for this. As mentioned on the other bacon.js PR, we currently have a new apps freeze in place until the next release but would be happy to review this for the next one.
Note: To date, we've been more likely to merge implementations that fit one of the categories listed on the homepage. I see this one as being more close to Backbone + an extension framework (Bacon) however we'll know better once we've had a chance to understand Bacon better.
I check the issue list if there's anything I could help you with the release. In the meanwhile, thanks for the awesome job you're doing with TodoMVC!
@pyykkis Thanks for the submission, but we discussed this internally and decided to pass on this. While interesting, we get a lot of implementations and we can't include them all. We felt that FRP is an interesting approach, but we want to prevent TodoMVC becoming a mere collection of different library combinations.
However we would really like it if you could add it to our wiki: https://github.com/addyosmani/todomvc/wiki/Other-implementations Thanks for understanding. :)