Managing State with RxJava by Jake Wharton

preview_player
Показать описание

RxJava's use in building Android apps has grown rapidly! Combining and composing synchronous and asynchronous sources of data has become easy. That burden that remains is where to put the overall state of the application and how to handle its changes. This talk will be an exploration in how we can increase the confidence and determinism of our app state.

Because Rx isn't specific to Android, we'll look at state management approaches employed by other platforms and languages and whether or not they're appropriate to use. We will also look at how state management fits into application architectures such as MVP and MVVM.

Attendees of this talk should already be comfortable with reactive programming and RxJava's APIs.

Jake Wharton is an Android developer at Square working on Square Cash. He has been living with a severe allergy to boilerplate code and bad APIs for years and speaks at conferences all around the world in an effort to educate more about this terrible disease.
Рекомендации по теме
Комментарии
Автор

One of the best talks that demonstrates the actual advantages of reactive programming. Very deep.

nullpointerE
Автор

yes that was insightful - thank you very much for publishing!

hansschenker
Автор

watched this for 4th time, and still amaze me

MohamedISoliman
Автор

Essentially what was described in this video is an event bus implemented in RxJava. Having done a similar implementation for my own project recently, I started to appreciate Rx for this approach...

igorg.
Автор

By far the great presentation and so rich materials... Great ....

amintalukder
Автор

One of the most inspiring video I have seen about Rx

shuwushu
Автор

Awesome talk. I love how you explained the problem in detail, makes it super simple to get the point of the talk. Also the slides and animations are very useful in aiding comprehension. Thank you Jake

MauroBanze
Автор

Although got to watch it a year after, I loved the way everything was presented! Very neatly put the code with the descriptive explanation of the complicated concepts.
Thank you very much!

AnitShrestha
Автор

Would love to see this approach using kotlin coroutine's flow api.

joney
Автор

A complex topic explained very nicely and made easy to understand... Thanks..

PraveerGupta
Автор

What an amazing talk! So in depth and clear. Well done.

KENTOSI
Автор

Unfortunalety he forgot to mention how to handle the case where an event supersedes another (37:48). Any hints what RX-technique he was gonna refer to?

tillsimon
Автор

I love how he explains things, Jake Wharton would be a great teacher!

necroCODE
Автор

The UI has 2 responsibilities: producing events, and rendering the results. Both require state management. This approach only solves the rendering part of the state problem by "scanning" results into a model that's stored inside the stream. Now, let's say we have a button that increments a counter. And then there's another button that needs to take the count and send it to the server. Where do we get this value? As I see it, we have 2 options:
1. Store the count (or the entire model) in a variable in the UI class (Fragment)
2. Store the model down stream (next to the scan function) and allow upstream to yank into it at any time

The second option is definitely bad since it breaks the unidirectional data flow concept. The first option kind of makes sense, but I'm wondering if there's another way.

UkrainianGuitarHero
Автор

"Will edit this in post" lol :)

mankinPT
Автор

SIdeEffects - AFAIU Side effects are accessing some data outside the stream.

In the at 29:39 the map operator is also causing side effect by accessing view directly. Also the service is also not part of the stream used in the bellow flatmap. Am I missing something here?

Nhawk
Автор

Awesome talk Jake! Thanks for explaining a relatively complex subject so simply. One thing I didn't get though is, how is the observable subscribing conf changes, rotations? provided that we are not using subjects "there's no subjects, there's no relays, there's none of these things that are ... not the ideal way of representing state"

roxferesr
Автор

i am wondering "user interface is essentially itself an asynchronous source" (06:01). Someone who can help me?

sirajuddaula
Автор

Why do you unify `submitEvents` and `checkNameEvents` into a single `events` observable, then split them again with `publish()` and `ofType()`, when you can skip that and straight away do

Observable.merge(
submitEvent.compose(submit),


to get a single observable stream the UI can subscribe to?

vinaynagaraj
Автор

On a side note. What would be a good program to make slides like these?

ukasztrojanowski