Transcript from the "Introducing Observables" Lesson
>> Lukas Ruebbelke: Let's move on to observable fundamentals. I love this. I love observables so much it hurts. So, who here, outside of what we've just done, has ever used an observable or would say that they are pretty familiar with how they work?
>> Speaker 2: I have used in the syllabus elect work, but they were similar to observables?
>> Lukas Ruebbelke: Okay.
>> Speaker 2: Where you would have an object which was tied from start to end.
>> Lukas Ruebbelke: Okay, so it's safe to say then this is probably kind of a fairly new concept for everyone here. Okay, how many people here understand the concept of promises at least? That something is happening in the future and were going to give you this object that when this thing eventually happens were going to actually notify you so that you can perform so unit of logic so that is kind of the essence of a promise.
[00:01:11] If you're not familiar with promises, kind of the best way to think of it is if you've ever went to like Chili's, or one of those restaurants. You show up with four of your buddies, you're like, I need a time. They're like, that's gonna be 20 minutes probably.
[00:01:28] What do they do? They give you a beeper. So that is equivalent of a promise. So you take your beeper and you go outside and you just hang out, or whatever you're gonna do, but you know at some point in the future this beeper is going to go off.
[00:01:47] AKA it's going to resolve. And when that does, then, you go inside and say, hey, I need to get my table. So, then you basically process the action that is intended had you walked up and they had a table right away. So what you're doing is you're deferring acting on something, some goal Into the future and that promise, essentially when it fires that's when you can do it, so just think of that concept if something is going to happen you have this object.
[00:02:16] Now the difference is, subscribe or observables work the same way, except instead of getting one object you can get many objects, it is literally a stream of data That you can subscribe to. In fact if I have time tomorrow, I really really really want to, because I kind of want to because I feel like we've been working really hard these last few days maybe introduce a few fun things tomorrow, so if i have a chance maybe a quick fire base example to show how this works.
[00:02:47] I totally saw your head like, shoot up you were just like " ?" Firebase? So if I can just to kind of amplify what we are talking here in terms of data streaming continually to you.