Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: port to RxJava 2.X #83

Merged
merged 40 commits into from Nov 28, 2016
Merged

feat: port to RxJava 2.X #83

merged 40 commits into from Nov 28, 2016

Conversation

kaushikgopal
Copy link
Owner

@kaushikgopal kaushikgopal commented Nov 27, 2016

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
Copy link
Owner Author

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
Copy link
Contributor

marukami commented Nov 27, 2016

+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
Copy link
Owner Author

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

Kaushik Gopal and others added 25 commits November 27, 2016 14:48
* port example Networking with Retrofit & RxJava (using zip, flatmap)
* port example Networking with Retrofit & RxJava (side by side with AsyncTask)
* port example Pseudo caching : retrieve data first from a cache, then a network call (using concat, concatEager, merge or publish)
* port example Pseudo caching : old merge e.g. with result age strategy

Merge branch 'marcinkunert-feat/rxjava_2' into feat/rxjava_2

* marcinkunert-feat/rxjava_2:
  Replaced RxJava1 retrofit adapter with the RxJava2 version
  Updated RxJava to 2.0.1
  Added packagingOptions so RxJava 1 and RxJava 2 can work on the same project
  Adjusted retrofit related examples
  Updated retrofit setup to return RxJava2 observables.
  fix: link for orchestrating observables
  fix: readme update links
  chore: update README + table of contents for e.g.s
feat/rxjava_2 Retrofit related examples update to RxJava2
Merge pull request #85 from marcinkunert/feat/rxjava2_buffer

Updated buffer demo to RxJava2
…cts & debounce) (#86)

Merge pull request (#86) from marcinkunert/feat/rxjava2_debounce
Updated debounce demo to RxJava2
* port example Pagination with Rx (using Subjects)
* port example RxBus : event bus using RxJava (using RxRelay (never
terminating Subjects) and debouncedBuffer)
* Observables don't allow returning null anymore
* port example Timeout
* port PlaygroundFragment
* port example Persist data on Activity rotations (using Subjects and
retained Fragments)
*  port example Persist data on Activity rotations (using Subjects and
retained Fragments) old variant

we no longer have a subscription coming out, so use another subject
 port example Networking with Volley
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants