Presentation is loading. Please wait.

Presentation is loading. Please wait.

Reactive Android Development

Similar presentations


Presentation on theme: "Reactive Android Development"— Presentation transcript:

1 Reactive Android Development
CS T & CS T Summer 2016 RxAndroid

2 Iterators Provide a consistent interface to accessing the elements of arbitrary data structures.

3 Iterators Provide a consistent interface to accessing the elements of arbitrary data structures. <setup> For(<type> e : E) { <update logic> } <finish>

4 Iterators Example: arithmetic mean Integer sum = 0;
For(Integer e : A) { sum += e; } Integer average = sum / A.size();

5 Observer Pattern Provides a means of registering for new values

6 Rx Additions to Observer Pattern
Provides a means of registering for new values And A means of signaling that no more values are coming A means of signaling that an error occurred

7 Rx Additions to Observer Pattern
Provides a means of registering for new values And A means of signaling that no more values are coming A means of signaling that an error occurred Without using Optional or Either

8 Reactive Replacement for Iterators
With these additions, a listener can perform an action similar to that of iteration on data that is arriving asynchronously.

9 Observables The basic element of Rx Two types: Hot Cold

10 Observables The basic element of Rx Two types: Hot Cold
Comparable to Sodium Streams Cold

11 Observables The basic element of Rx Two types: Hot Cold
Comparable to Sodium Streams Cold Delivers data from a fixed source whenever anyone subscribes

12 Observables The basic element of Rx Two types: Hot Cold
Comparable to Sodium Streams Cold Delivers data from a fixed source whenever anyone subscribes Starting from the beginning

13 Observables The basic element of Rx Two types: Hot Cold
Comparable to Sodium Streams Cold Delivers data from a fixed source whenever anyone subscribes Starting from the beginning Can be handy for experimenting

14 Marble Diagram

15 Resources http://rxmarbles.com http://reactivex.io
Interactive marble diagrams (when not on iOS, apparently!) The 'Docs' menu at the top provides links


Download ppt "Reactive Android Development"

Similar presentations


Ads by Google