filmov
tv
1 - Observables - part 1 : Pull and Push protocols | Rxjs Tutorial In Arabic

Показать описание
A pull system is basically a function. A function is usually first defined (a process called production) and then somewhere along the line called (this process is called consumption)to return the data or value in the function. For functions, the producer (which is the definition) does not have any idea of when the data is going to be consumed, so the function call literally pulls the return value or data from the producer.
A push system, on the other hand, control rests on the producer, the consumer does not know exactly when the data will get passed to it. A common example is promises in JavaScript, promises (producers) push already resolved value to call-backs (consumers). Another example is RxJS Observables, Observables produces multiple values called a stream (unlike promises that return one value) and pushes them to observers which serve as consumers.
#Angular #Rxjs #Rxjs_in_Arabic #ng_arab #Angular_Army #Observables #Creation_Operators #Join_Creation_Operators #Transformation_Operators #Filtering_Operators #Join_Operators #Multicasting_Operators #Error_Handling_Operators #Utility_Operators #Conditional_and_Boolean_Operators #Mathematical_and_Aggregate_Operators
A push system, on the other hand, control rests on the producer, the consumer does not know exactly when the data will get passed to it. A common example is promises in JavaScript, promises (producers) push already resolved value to call-backs (consumers). Another example is RxJS Observables, Observables produces multiple values called a stream (unlike promises that return one value) and pushes them to observers which serve as consumers.
#Angular #Rxjs #Rxjs_in_Arabic #ng_arab #Angular_Army #Observables #Creation_Operators #Join_Creation_Operators #Transformation_Operators #Filtering_Operators #Join_Operators #Multicasting_Operators #Error_Handling_Operators #Utility_Operators #Conditional_and_Boolean_Operators #Mathematical_and_Aggregate_Operators
Комментарии