mbest / knockout

My enhancements to Knockout
35 stars 4 forks source link

re-thinking Knockout: bindings, observables, and reactive programming #20

Open mbest opened 12 years ago

mbest commented 12 years ago

I've been reading lately about reactive programming and think that Knockout, through computed observables, provides many of the features of reactive programming. One area, though, that is at odds with reactive programming is the binding system, mainly that bindings don't often properly capture all their dependencies.

One approach is to create a new level between the DOM and Knockout bindings that allows access to the DOM through observables. This is similar to the current binding system, but isn't specifically about binding to a view model, only accessing and updating the UI through the observable system. Bindings (in their traditional sense) would simply link view model properties to UI observables. More complex bindings, such as value, might access and watch multiple UI observables.