4 ms·
Well, observables would just be used as a mechanism to implement a flux-like architecture or decouple various parts of your server-side codebase (making them op
by spion 12y ago
Well, observables would just be used as a mechanism to implement a flux-like architecture or decouple various parts of your server-side codebase (making them open to extension). A bit like event emitters, but without the stringly typed event names. I don't think thats evil? [1]
Or they can also be used in place of asynchronous lists (like "object streams"). I find them handy for various tasks :)
Regarding es6-promise, its too minimal for my taste, and missing my favorite feature (provided by bluebird. when and p-promise): long stack traces on (possibly) unhandled errors, which are quite invaluable on the server side when debugging longer chains of events. p-promise has the additional advantage of being a relatively small library which is pretty awesome :)
[1]: example: flux implemented with rxjs: https://github.com/fdecampredon/react-rxjs-todomvc https://github.com/fdecampredon/react-rxjs-todomvc