Live data from Hacker News

Netflix Releases Falcor Developer Preview

techblog.netflix.com

51–53 of 53 posts

Re: Netflix Releases Falcor Developer Preview

#51
This seems interesting. Given Netflix's admitted love of RX [Reactive Extensions] I'm somewhat curious if there is a design reason that this uses Promises instead of (RxJS/Bacon/...) Observables? At first skim this seems like it could be even more useful as an Observable model. I'm also curious if there is a design reason they aren't using ES5 defineProperty/ES6 property syntax over get()/set()?

(Reposting my questions from: https://news.ycombinator.com/item?id=10075433)

Re: Netflix Releases Falcor Developer Preview

#52

This seems interesting. Given Netflix's admitted love of RX [Reactive Extensions] I'm somewhat curious if there is a design reason that this uses Promises instead of (RxJS/Bacon/...) Observables? At first skim this seems like it could be even more useful as an Observable model. I'm also curious if there is a design reason they aren't using ES5 defineProperty/ES6 property syntax over get()/set()? (Reposting my questio…

Interestingly enough, we actually return Observables. The model returns a Model Response, which inherits from Observable. It also adds a "then" method which returns a promise when called.

The primary advantage of using the Observable's "subscribe" method instead of "then" is that you can cancel a request. Netflix makes heavy use of this feature. For example when quickly browsing through titles, we may cancel the request for data that you are no longer looking at.

Re: Netflix Releases Falcor Developer Preview

#53
post #52

This seems interesting. Given Netflix's admitted love of RX [Reactive Extensions] I'm somewhat curious if there is a design reason that this uses Promises instead of (RxJS/Bacon/...) Observables? At first skim this seems like it could be even more useful as an Observable model. I'm also curious if there is a design reason they aren't using ES5 defineProperty/ES6 property syntax over get()/set()? (Reposting my questio…

Interestingly enough, we actually return Observables. The model returns a Model Response, which inherits from Observable. It also adds a "then" method which returns a promise when called. The primary advantage of using the Observable's "subscribe" method instead of "then" is that you can cancel a request. Netflix makes heavy use of this feature. For example when quickly browsing through titles, we may cancel the requ…

That's very good to know. All of the examples I saw in the documentation were using the Promise "then" and I didn't see any mention that they were in fact returning Observables.

If I may suggest it, perhaps you might add this a bit more explicitly to the documentation including possibly an example or two that makes use of them as Observables?

Post reply on HN