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

Provide a reference reactive android app with coroutines #945

Closed
Ghedeon opened this issue Jan 18, 2019 · 2 comments
Closed

Provide a reference reactive android app with coroutines #945

Ghedeon opened this issue Jan 18, 2019 · 2 comments
Labels
docs KDoc and API reference flow up for grabs

Comments

@Ghedeon
Copy link

Ghedeon commented Jan 18, 2019

There is a need for less synthetic and more practical examples of Channel/Actor usage. It's an understandable (because of experimental status) impression that this topic is being avoided but maybe having a reference app from JB (or Google?) will trigger a productive discussion about in-the-field use cases.

Current status:
KotlinConf 2018. @chrisbanes https://github.com/chrisbanes/tivi
Awesome talk about coroutines and channels. The app is rewritten to replace Single/Maybe/Completable with suspended functions. The reactive part didn't got converted to Channels tho, as one might expect, and still uses RxJava Flowable. Reactive (Rx), no channels.

Google Sample: todo-mvp-kotlin
https://github.com/googlesamples/android-architecture/tree/todo-mvp-kotlin/
Uses suspended functions and good ol' callbacks when it's not enough. That's even pre Rx era.
Not reactive, no channels.

Google Sample: todo-mvvm-live-kotlin
https://github.com/googlesamples/android-architecture/tree/todo-mvvm-live-kotlin/
Suspended functions and workarounds like:

override fun refreshTasks() {
        cacheIsDirty = true
}

in order to avoid reactiveness, therefore — not truly reactive, no channels.

A subjective idea of what kind of app would fill the gap:

@elizarov elizarov added the docs KDoc and API reference label Feb 22, 2019
@elizarov
Copy link
Contributor

I'm adding flow label here since whatever "example reactive app" we'll have a "recommended to write code with coroutines" it will have to be using flows. Also adding up for grab, because that would be great place for external contributions and, most likely, the sampel app will have to live in its own repository. We also plan to remove existing example app from the report after converting them into tests for CI purposes.

@elizarov elizarov changed the title Provide a reference android app that uses Channels Provide a reference reactive android app with coroutines Jul 17, 2019
@elizarov
Copy link
Contributor

elizarov commented May 7, 2020

Closing this one as Android team is doing a great job on teaching coroutines use nowadays.

@elizarov elizarov closed this as completed May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs KDoc and API reference flow up for grabs
Projects
None yet
Development

No branches or pull requests

2 participants