nextcloud / nextcloud/android

Switch to modern system

Open
#3,146 5 comments 0 reactions 1 assignee Claimed by @tobiasKaminsky View on GitHub
enhancement overview technical debt
Dominant language
Kotlin
Stars
5.6k
Forks
2k
Avg merge
2d 18h
Merged PRs (30d)
92

Description

Our current architecture system is really old and evolved over years.
I think it is a good point to migrate it step by step to a modern system, as described [here](https://developer.android.com/jetpack/docs/guide).

This is an overview, how it looks like:
![image](https://user-images.githubusercontent.com/5836855/46952468-36030800-d08b-11e8-93f1-ac1c5935343c.png)

In short:
- [separation of concerns](https://developer.android.com/jetpack/docs/guide#separation-of-concerns)
- use Dagger2 for dependency injection (DI)
- use [Data Binding](https://developer.android.com/topic/libraries/data-binding)
- use Room
- use LiveData
- use [ViewModel](https://developer.android.com/topic/libraries/architecture/viewmodel)
- to prevent rotation problems
- avoids async task problems
- share data between fragments: later usable for split view on tablets
- [further reading](https://medium.com/androiddevelopers/lifecycle-aware-data-loading-with-android-architecture-components-f95484159de4)
- Network handling: https://developer.android.com/jetpack/docs/guide#addendum
- benefit: get a more easy [testing environment](https://developer.android.com/jetpack/docs/guide#test-components)

I would like to test this first on UserInfo Activity as this is a nice well defined part of our app. I will add caching to it.

Later I would go with Activities, which will also benefit from caching.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.