Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Latest commit

 

History

History
63 lines (55 loc) · 2.14 KB

README.md

File metadata and controls

63 lines (55 loc) · 2.14 KB

Programming Concepts and Paradigms

This repository holds our school project about reactive programming with reactiveX. We choose JavaScript/TypeScript to demonstrate how observables, observers and operators work.

  • Basics idea: asynchronous data streams

    Stream Example

Observer Pattern

  • Hot vs. cold observables
    • COLD is when your observable creates the producer
        // COLD
        var cold = new Observable((observer) => {
        var producer = new Producer();
        // have observer listen to producer here
        });
    • HOT is when your observable closes over the producer
        // HOT
        var producer = new Producer();
        var hot = new Observable((observer) => {
        // have observer listen to producer here
        });
  • Async Subject
  • Behavior Subject
  • Replay Subject

RxMarbels

Standard Operators

  • Map
  • Filter
  • Scan
  • SwitchMap
  • MergeMap
  • combineLatest
  • take

Backpressure Operators

  • Throtteling
  • Buffering
  • Debounce
  • Windows
  • RxJS
  • RxJava

Notes

Run the examples

To run the examples make sure you have node.js(tested Version 8.9.3LTS) installed on your system. Run npm install to install the dependencies and run the examples in the console with "node ./src/.js