Angular 6 - Observable explanation in plain English

后端 未结 4 510
被撕碎了的回忆
被撕碎了的回忆 2020-12-28 11:36

I\'m looking for a plain English explanation of what an Observable is in RXJS.

What it can be used for, and any useful explanations either video links, tutorials, us

4条回答
  •  死守一世寂寞
    2020-12-28 12:09

    For a laugh, this fictional story only for dummies like me to understand:

    After 7 years of marriage, wonderful John still in love with beautiful Kate, but Kate's girlfriends all tell her to keep an eye on John who works longer and longer hours now in the office.

    "I'll call you back, busy, work on it." So CALLBACK is what Kate always hears when she calls John, one call-out one call-back. Though sometimes not easy to keep track of things for John.

    John loves Kate, he upgrades the wording and handling by saying "I PROMISE (to do call Kate back)!" THEN again Kate is pleased and she establishes a safenet to CATCH the unexpected response, a better way to organize than Callbacks.

    Kate is very happy with John, but her girlfriends still gossip on it, especially technology is advancing. So they all tell Kate, "you'd better OBSERVE him..." John is now OBSERVABLE to Kate who jokes to her darling that she's SUBSCRIBE to him, meaning John can now response continuously, no longer once, and can be multiple times, response can be streamed! Yulp, instead of one response per request, he sets up a little camera on his desk to keep her updated all the time. For example, Kate cares about his diet, he'd report "honey I just had a piece of cheese cake and an apple for breakfast", ... "honey I had a yummy lunch from ..." Lovely!

    The END

提交回复
热议问题