java-LearningRxjava-ch01-Thinking Reactively

前言
公司用到rxjava,学习Learning-Rxjava笔记
本书源码位置:https://github.com/PacktPubli...

1.A brief history of ReactiveX and RxJava

作为程序员,我们的工作是Modeling our world with code,object-oriented programming 很好地抽象我们的世界,但是,As 2010 approached, it became clear that object-oriented programming only solved part of the problem.

Classes and objects do a great job of representing an entity with properties and methods,但是各个entity 之间的复杂关系的抽象,使得面向对象编程有很多模板化的代码,十分臃肿,此时,functional programming卷土重来,作为object-oriented的一个补充。Reactive
programming, a functional event-driven programming approach, began to receive special attention.微软的Erik Meijer 为.net写了一个 Reactive Extensions的框架,后来其1.0Rx和2.0ReactiveX逐渐扩展到其它语言。

Netflix 公司的Ben Christensen 和 David Karnok 作为主要人员创作了rx-java.其中
RxJava 1.0 在2014年11月发布 , RxJava 2.0在2016年11月发布。

reactiveX的核心理念是:
The fundamental idea of ReactiveX is that events are data and data are events.

2.Thinking reactively

对象都是运动和变化的
比如天气。书本上的内容是静止不变的,但是,当读者看书时,书上的内容被读者的眼睛一点点消费,那么其内容也是变化的。也是
对象都是相互关联的
比如天气和人的行为。
对象的变化都是在同时(并行)的
比如马路上,机动车道上的汽车和非机动车道路上的人都是同时运行的。彼此还要相互观察。

所以可以使用 multiple concurrent streams of events or data happening at the same time 来modeling world

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值