ionic-team / ionic-io-docs

Ionic.io Docs Site
http://docs.ionic.io/
11 stars 12 forks source link

feat(ad.md): callback style for realitme #2

Closed PatrickJS closed 3 years ago

PatrickJS commented 9 years ago

a promise is only resolved once so using callback style or streams (RxJS) makes a lot more sense for a realtime/reactive/buzzword system :)

PatrickJS commented 9 years ago

oops I renamed Cloud Value to Live Value as a joke and forgot to change it back

mlynch commented 9 years ago

I kind of like Live Value instead :) I hesitated to add "cloud" in since it makes me want to vomit, but it was the most descriptive thing I could think of at the time.

PatrickJS commented 9 years ago

haha yeah I much prefer Live Value over Cloud Value

mlynch commented 9 years ago

Nice :) Let me think about that streaming use case and I'll come back to this. I think Live Value is the word

PatrickJS commented 9 years ago

As much as I love RxJS and streams I would stick with callback style since most users are use to that

mlynch commented 9 years ago

Could use promise's notify rather than resolve to constantly call it?

PatrickJS commented 9 years ago

Going with a callback isn't that bad. Using notify would make the api seem like a valid promise when it's not. I don't think the user would compose promises for a/b testing so I'm all for callbacks for this use case