码迷,mamicode.com
首页 > 其他好文 > 详细

reactiveX沉思(草稿)

时间:2019-10-12 21:10:04      阅读:127      评论:0      收藏:0      [点我收藏+]

标签:系统   you   htm   tor   dia   like   eve   reduce   doc   

一、第一性原理

将异步的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沉思(草稿)

标签:系统   you   htm   tor   dia   like   eve   reduce   doc   

原文地址:https://www.cnblogs.com/feng9exe/p/11663552.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!