Top Banner
Reactive Extensions or Hollywood principle Anton Sizikov 03-Oct-2014 Amsterdam
21

Reactive Extensions or Hollywood principle

Jul 13, 2015

Download

Software

Anton Sizikov
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Reactive Extensions or Hollywood principle

Reactive Extensionsor Hollywood principle

Anton Sizikov 03-Oct-2014Amsterdam

Page 2: Reactive Extensions or Hollywood principle

Agenda

● Quick introduction to Pull model● Why do we need Push model?● What is Rx?● How can we use it?● Is it only for .Net?

Page 3: Reactive Extensions or Hollywood principle

Is it all about .Net only?

No

Page 4: Reactive Extensions or Hollywood principle

Pull model

Page 5: Reactive Extensions or Hollywood principle

Typical code

Page 6: Reactive Extensions or Hollywood principle

IEnumerable<T>

Page 7: Reactive Extensions or Hollywood principle

Linq or declarative code

Page 8: Reactive Extensions or Hollywood principle

One bad example

Happy debugging!

Page 9: Reactive Extensions or Hollywood principle

Hollywood principle

Page 10: Reactive Extensions or Hollywood principle

Hollywood principle

Page 11: Reactive Extensions or Hollywood principle

How do we implement it?

● Events● Callbacks● Observers

Page 12: Reactive Extensions or Hollywood principle

Observer pattern

Page 13: Reactive Extensions or Hollywood principle

IObservable<T>

Page 14: Reactive Extensions or Hollywood principle

Push model

Page 15: Reactive Extensions or Hollywood principle

Duality

Page 16: Reactive Extensions or Hollywood principle

Duality

● IObservable ⇔ IEnumerable● UnitTesting

Page 17: Reactive Extensions or Hollywood principle

Demo

Page 18: Reactive Extensions or Hollywood principle

Rx-family

● Rx.Net● RxJs (ES6, Angular, jQuery,DOM, Node...)● RxCpp● RxJava● RxPy● Rx.PHP● and more...

Page 19: Reactive Extensions or Hollywood principle

Some names

Page 20: Reactive Extensions or Hollywood principle

Interested?

reactivex.io

Page 21: Reactive Extensions or Hollywood principle

Questions?