Reactive Programming

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Reactive Programming

By ReactiveX
What is Reactive Programming?
In computing, reactive programming is a declarative programming paradigm concerned with data streams and the propagation of change. With this
paradigm it is possible to express static (e.g., arrays) or dynamic (e.g., event emitters) data streams with ease, and also communicate that an
inferred dependency within the associated execution model exists, which facilitates the automatic propagation of the changed data flow.

https://en.wikipedia.org/wiki/Reactive_programming

Reactive programming is an asynchronous programming paradigm concerned with data streams and the propagation of change

https://angular.io/guide/rx-library
Why ReactiveX ?
- Use in Angular 2 to Handle Async.
- Concurrency made easy
- Async error handling
Getting Started : marble diagrams
- Observer and Observable
- Operators
- Scheduler
Observable and Observer
- Observer and Observable

In ReactiveX an observer subscribes to


an Observable.
An Observable emits items or sends
notifications to its observers by calling
the observers’ methods.
Operators
- Operators

Implementations, most operators


operate on an Observable and return an
Observable.
- Operators by Category
- Creating
- Transforming
- Filtering
- Combining
- Error Handling
Operators : create
Operators : from
Operators : forkJoin
Real Case : Angular - Reactive Form

https://stackblitz.com/edit/angular-6xcnfc-reactive-form
Real Case : Angular - HttpClient

https://stackblitz.com/edit/angular-http-client-123
Thank You

Q&A
References

- https://angular.io/guide/rx-library
- https://firlana.com
- https://medium.com/@ifirlana/event-driven-programming-b783b8d19362
- https://en.wikipedia.org/wiki/Reactive_programming
- https://medium.com/@madhupathy/learn-functional-and-reactive-programming-paradigms-with-java-9
-d8454f1dab3e
- https://stackblitz.com/edit/angular-http-client-123?file=src/app/app.component.ts
- https://stackblitz.com/edit/angular-6xcnfc-reactive-form
- http://reactivex.io/documentation/operators.html

You might also like