3 ms·
Looks cool but I prefer the syntax of angular's data binding (no need to use #get() or #set()). Is this pretty much the same as angular's data binding?
by thecolorblue 13y ago
Looks cool but I prefer the syntax of angular's data binding (no need to use #get() or #set()). Is this pretty much the same as angular's data binding?
- sfvisser 13y agoThe ideas here are similar in a sense. I'm not an expert on Angular, but their focus seems to be on templates that update automatically using data bindings. Our framework focuses more on compositionally of reactive data networks, connecting it to the DOM using reactive jQuery methods is just one of the outputs we allow. The set and get methods are there to go from the JS world to the reactive world and back. Usually you're working with reactive variables (as if they were actual values) directly, in that case you won't use get and set at all.
- thecolorblue 13y agoOk, I see where there is not getting/setting. Looks very cool. In angular, there are no setters/getters, you just set values the vanilla way... val = newVal; Angular keeps a reference and a copy of all the watched variables, checks for a change during the 'digest' cycle, and triggers events accordingly. It's not completely for updating the DOM. The syntax for Reactive looks cleaner (I guess ES6 helps a bit).
- cowbertvonmoo 13y agoNot exactly Functional Reactive Programming, FRB (Bindings) are actually a form of Self Adjusting Computation, but similar in spirit to what you see here, and what you see in Angular. You don’t need #get() and #set(), but it’s implemented using ES5 property descriptors and propagates synchronously. Also, unlike dependent properties like Ember, the dependencies do not have to be repeated—they are inferred from the expression language. https://github.com/montagejs/frb https://github.com/montagejs/frb