reactiveX沉思(草稿)

Posted feng9exe

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了reactiveX沉思(草稿)相关的知识,希望对你有一定的参考价值。

一、第一性原理

将异步的io、事件解释为observable。并借用observer的一些类概念进行处理。

 

ReactiveX is a library for composing asynchronous and event-based programs by using observable sequences.

 

It extends the observer pattern to support sequences of data and/or events and adds operators that allow you to compose sequences together declaratively while abstracting away concerns about things like low-level threading, synchronization, thread-safety, concurrent data structures, and non-blocking I/O.

 

一、基本要素

 

 

二、范式概念

Better codebases

Functional

Avoid intricate stateful programs, using clean input/output functions over observable streams.

Less is more

ReactiveX‘s operators often reduce what was once an elaborate challenge into a few lines of code.

Async error handling

Traditional try/catch is powerless for errors in asynchronous computations, but ReactiveX is equipped with proper mechanisms for handling errors.

Concurrency made easy

Observables and Schedulers in ReactiveX allow the programmer to abstract away low-level threading, synchronization, and concurrency issues.

 

三、解释系统

 

以上是关于reactiveX沉思(草稿)的主要内容,如果未能解决你的问题,请参考以下文章

RxJava 学习资料——ReactiveX和RxJava

ReactiveX

ReactiveX序列——RxSwift

ReactiveX-简介

关于使用 swift 进行 ReactiveX 编程的查询 [关闭]

io.reactivex.exceptions.UndeliverableException:java.io.InterruptedIOException