android / architecture-samples

A collection of samples to discuss and showcase different architectural tools and patterns for Android apps.
Apache License 2.0
44.48k stars 11.65k forks source link

New sample: MVP-RxJava #9

Closed JoseAlcerreca closed 8 years ago

JoseAlcerreca commented 8 years ago

Based on MVP but using RxJava for asynchronous jobs, event handling and data observation.

Rainer-Lang commented 8 years ago

This would be great. I hope with usage of Dagger2.

clarle commented 8 years ago

@ErikHellman Are you already working on this? Or is this an open issue for anyone to jump on? Would love to help.

JoseAlcerreca commented 8 years ago

@Rainer-Lang RxJava with Dagger2 would come after this one and the Dagger2 sample.

@clarle He is! But there will be more RxJava samples :)

thinwonton commented 8 years ago

Expect and concern about it. By the way, how to build a bridge between two presenters like a user profile changed event?

Rainer-Lang commented 8 years ago

@ErikHellman You are implementing this sample, right? What is your suggestion for eg long running tasks like network requests and screen rotation (no abortion of the network request)? Will you integrate this in the example?

Joslyn-Chen commented 8 years ago

The samples were done?

Rainer-Lang commented 8 years ago

What would you like to do? If you want, just make a PR. :-)

andrewpiggy commented 8 years ago

When will MVP-RxJava be launched?

geniushkg commented 8 years ago

Hey folks , Anything on MVP - RxJava + Realm possible ? suggestions welcomed , I am planning to build one.

JoseAlcerreca commented 8 years ago

@ErikHellman @florina-muntenescu can you give an update on this sample? All tests pass now, looking good!

florina-muntenescu commented 8 years ago

The sample (here)[https://github.com/googlesamples/android-architecture/tree/dev-todo-mvp-rxjava] is an implementation that uses RxJava as a way of communicating between the data model layer and the presenter. The TasksLocalDataSource uses SqlBrite, to query the database and get the results as streams. We kept the same way of injecting dependencies as in the main todo-mvp project, to keep it as simple as possible. The Presenter contracts and the Views are unchanged. From me and @ErikHellman this sample is done.

JoseAlcerreca commented 8 years ago

Sample promoted to stable! https://github.com/googlesamples/android-architecture/tree/todo-mvp-rxjava

Thanks @ErikHellman, @florina-muntenescu and everyone involved!