|
|
|
|
|
by tqs
4699 days ago
|
|
This is a really nice cleanup/update on Knockout. The source code at ~400 lines is very understandable. I've looked at a lot of reactive frameworks, this is great work! I'm glad you're thinking about how to manage garbage collection. It's tricky with these push-based frameworks. Have you given consideration to asynchronous vs synchronous reactivity? The advantage of asynchronous is you don't propagate the changes as they are made but instead once all the changes are done. You can avoid redundant computations this way, for example if a bind is dependent on multiple observables that change in the same "turn". And in some ways (worth debating) asynchronous semantics are more understandable than synchronous since unknown code is not being run underneath you while you are in the middle of changing observables. Here's Ember's writeup on their rationale for asynchronous:
http://emberjs.com/guides/understanding-ember/managing-async... Also since Object.observe is asynchronous, Google's polymer/MDV will also I believe have these semantics. |
|