https://github.com/code-inflation/pcp-reactive
school proj about reactive programming in JS/ TS
https://github.com/code-inflation/pcp-reactive
Last synced: 7 months ago
JSON representation
school proj about reactive programming in JS/ TS
- Host: GitHub
- URL: https://github.com/code-inflation/pcp-reactive
- Owner: code-inflation
- Archived: true
- Created: 2017-11-28T15:23:03.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-19T15:12:16.000Z (about 8 years ago)
- Last Synced: 2025-07-14T06:55:01.097Z (7 months ago)
- Language: JavaScript
- Size: 934 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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.
## [Reactive programming background](http://reactivex.io/rxjs/manual/overview.html#introduction)
- Basics idea: asynchronous data streams

## [Observable](http://reactivex.io/rxjs/manual/overview.html#observable)
## [Observers](http://reactivex.io/rxjs/manual/overview.html#observer)

- Hot vs. cold observables
- COLD is when your observable creates the producer
```javascript
// 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
```javascript
// HOT
var producer = new Producer();
var hot = new Observable((observer) => {
// have observer listen to producer here
});
```
## [Subjects](http://reactivex.io/rxjs/manual/overview.html#subject)
- Async Subject
- Behavior Subject
- Replay Subject
## [Operators](http://reactivex.io/rxjs/manual/overview.html#operators)
[RxMarbels](http://rxmarbles.com/)
### Standard Operators
- Map
- Filter
- Scan
- SwitchMap
- MergeMap
- combineLatest
- take
### Backpressure Operators
- Throtteling
- Buffering
- Debounce
- Windows
## [Languages](http://reactivex.io/languages.html)
- RxJS
- RxJava
## Notes
- http://reactivex.io/rxjs/manual/tutorial.html#external-references
- http://reactivex.io/
- https://medium.com/@benlesh/hot-vs-cold-observables-f8094ed53339
- https://rxviz.com/examples/grouped-fibonacci
## 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