Week Nine of Learning Angular
August 4, 2021
Oh my goodness, I am so tired this morning. I only had 2 hours of sleep!
My contracting work is slow this week so I am getting back to Learning Angular with Mosh (self-paced tutorial) again. I am 34% of the way. I know you're probably wondering why it is taking me so long to finish! As mentioned in my other weekly blog recaps with learning notes for Angular, it's because it takes me a long time to debug version differences as I am running a new version of Angular, whereas Mosh's tutorial is teaching with a much older version. I'm coding along while I'm listening to his videos.
Optimistic vs Pessimistic Updates
Modern updates utilizes Optimistic Updates as it'll render changes faster, which is where you make the changes like using a splice method before you make a call to an API server.
Observables vs Promises
For Angular, you use can Observables async operations. The async calls will only happen when you call subscribe with an observable. Observable are lazy and promises are eager and nothing happens until you subscribe with observable. You can always change observable into a promise but Mosh doesn't recommend it. You also need .then for observables whereas, you don't need a .then with promises.
The cool thing about observables is you can use something like the .retry(3) operator. You mainly use .map and .catch for observables. You can also chain events before subscribing when using observables.
My contracting work is slow this week so I am getting back to Learning Angular with Mosh (self-paced tutorial) again. I am 34% of the way. I know you're probably wondering why it is taking me so long to finish! As mentioned in my other weekly blog recaps with learning notes for Angular, it's because it takes me a long time to debug version differences as I am running a new version of Angular, whereas Mosh's tutorial is teaching with a much older version. I'm coding along while I'm listening to his videos.
Optimistic vs Pessimistic Updates
Modern updates utilizes Optimistic Updates as it'll render changes faster, which is where you make the changes like using a splice method before you make a call to an API server.
Observables vs Promises
For Angular, you use can Observables async operations. The async calls will only happen when you call subscribe with an observable. Observable are lazy and promises are eager and nothing happens until you subscribe with observable. You can always change observable into a promise but Mosh doesn't recommend it. You also need .then for observables whereas, you don't need a .then with promises.
The cool thing about observables is you can use something like the .retry(3) operator. You mainly use .map and .catch for observables. You can also chain events before subscribing when using observables.
Posted by Ninja Space Content. Posted In : angular