News for hackers. Stuff that matters.
Re:Reactor.js: simple reactive programming for Javascript by sinkasapa on Thursday May 16, 2013 @02:28PM (#5720179)
Other than the fact that this is more minimal, does anyone have any insight in to how this compares to Bacon, Flapjax or RxJs? I've been wanting to give this coding style a try but tend to get turned off by the size and complexity of the existing libraries. I look at this as a personal fault not that of the libraries. I plan to read the source of Reactor.js, which is very well commented. Until then, does anyone know if this is a "complete" implementation or is something fundamental missing? Is it push or pull?
Re:Reactor.js: simple reactive programming for Javascript by alipang on Thursday May 16, 2013 @07:17PM (#5721838)
Bacon/Rx allows you to work with an event stream abstraction, which assigns responsibility quite differently.

Bacon is more like excel in the sense that a cell defines /itself/ in terms of other cells

    A1 = B1 + C1
or in Bacon

    var as = bs.combine(cs, (b,c) -> b + c)
The style in ko/reactor is often inverted. One opens a 'bus' or 'signal', to which an arbitrary set of others push values.

    var as = Signal()

    function bs() {
      as(...) // push value
    }
Of course, the point of Bacon is that Rx.js does not quite define an event stream abstraction, as it has the (kinda weird) distinction between hot and cold observables which can be way surprising.
Re:Reactor.js: simple reactive programming for Javascript by simonhughes22 on Thursday May 16, 2013 @02:35PM (#5720245)
Knockout does this but it also has declarative html bindings, so there is no need to do the observer logic, you just add some lightweight annotations to your html and it binds for you. I think this is a lightweight alternative to ko, but ko does a lot more and is very easy to use.
Re:Reactor.js: simple reactive programming for Javascript by sinkasapa on Thursday May 16, 2013 @02:54PM (#5720382)
But I only want the reactive programming part. How do I take out all the parts that I don't want or need in knockout?
Re:Reactor.js: simple reactive programming for Javascript by fynyky on Thursday May 16, 2013 @02:36PM (#5720249)
It's "complete" as far as I've tested it. Changes are automatically pushed out without any additional work.

In terms of how it compares - It's based off the same reactive programming principles but is trying to keep the additional syntax and complexity to a minimum.

Re:Reactor.js: simple reactive programming for Javascript by sinkasapa on Thursday May 16, 2013 @02:52PM (#5720371)
It looks just perfect for me. And to those who keep on talking about knockout.js, this is great because not everyone wants all the bloat of yet another big "do everything" JS library.