kaushikgopal / RxJava-Android-Samples

Learning RxJava for Android by example
Apache License 2.0
7.55k stars 1.37k forks source link

feat: port to RxJava 2.X #83

Closed kaushikgopal closed 7 years ago

kaushikgopal commented 7 years ago

See #82 for thought process behind how this is being done.

RxJava 2.0 has hit stable, so it is time to port these. Here's what's different in 2.0. For a lazy quick helpful summary, you can check the fragmented episode with Jake.

Both 1.x and 2.x will coexist temporarily until we're done with the migration. After that all references to 1.x can be removed.


thanks @marukami + @marcinkunert for lighting the fire on this

kaushikgopal commented 7 years ago

as @marcinkunert pointed out RxBindings (which we use in a couple of examples) hasn't been ported yet.

Option 1: we use karnok's excellent Interop lib Option 2: we remove RxBindings and use Subjects or the like to achieve the same functionality (which we sort of do already in the double binding example)

i'm leaning towards Option 1 just because i think that's the more realistic situation for us in our real world apps. Option 2 would be cleaner but it's crazy to have to re-write or emulate functionality already being provided through other libs.

k let's go with Option 1 for now 👍

marukami commented 7 years ago

+1 for Option 1 It's not just RxBindings that's still 1.x; Realm is also still 1.x. The bindings examples should be useable instances in both contexts.

kaushikgopal commented 7 years ago

yup. was actually just looking at Realm's support the other day. Given Realm's open source, once we're done here, should help with the migration there :P.

above being said, since we don't use Realm in any of the examples i would have been inclined to not worry about it. but you're right the more i think about it, there are way too many libs that are useful and haven't been ported to 2.x yet. makes sense to also demonstrate how the interop would work