-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Welcome new Android components and architecture #2351
Labels
Comments
Closed
davigonz
changed the title
Welcome new Android components [WIP]
Welcome new Android components
Dec 19, 2018
22 tasks
14 tasks
davigonz
changed the title
Welcome new Android components
Welcome new Android components and architecture
Feb 21, 2019
25 tasks
Closed
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Android is getting more mature and modern and it would be great to start using some of the next technologies to make the ownCloud Android app more robust, testable and future-proof:
Besides, we will modularize the app in different layers
You can find all the sections below more widely describe in:
From MVC to MVVM + Android arch components
Modularization with layers approach
Advantages:
Key points:
I/0 '19 talk: https://youtu.be/PZBg5DIzNww
New error and data handling
RemoteOperationResult
object will not longer appear above data layer, the remote datasources will retrieve data or throw new exceptions to upper layers.UseCaseResult
object in domain layer.ShareEntity
and transforming it toShare
before pushing it to upper layers.UseCaseResult
objects and transform the information contained there in newUIResult
objects.Dependency graph
I've found an open source tool called Apk dependency graph that could help us to follow the decoupling process.
This is how the dependency graph for the ownCloud Android app looks like, based on New arch - capabilities branch (I put it live in https://davigonz.github.io/oCAndroidDependencyGraph/ so everyone can play with it) :
Above we can notice some parts of new architecture (OCShareRepository, OCShareViewModel, OCCapabilityRepository, OCCapabilityViewModel...) along with old code.
And below there's an example of a good architecture with low class coupling:
Taking into account this diagram while working on the new architecture would be great and will allow us to have a higher level vision and complete the whole app transformation process.
So we could use this issue as an epic and create possible changes that come to our mind after having a look at the diagram.
Note: the diagram is currently hosted as a webpage in https://davigonz.github.io/oCAndroidDependencyGraph/ and it uses this repo but we could move it with the rest of ownCloud repositories and even update the diagram via some kind of script included in bitrise (not sure if is possible, need to be checked) and have it updated with new arch changes.
Initial tasks
Update Gradle + support for Android Studio 3.2.1: Android Studio 3.2.1 + Gradle update #2327
Remove Eclipse structure: General project structure #2044
Architecture research:
Clean up + refactors, keep working on Cleanup project #2750 or even Possible Code refactorings #2153
Define lint policies and coding convention and publish them for community https://kotlinlang.org/docs/reference/coding-conventions.html
Start implementation, defining different use cases, diagrams and using tests (unit, integration, UI). Have a look at USE CASES section.
Consider using paging to show lots of files.
Use current
RemoteOperationResult
objects or opt for a new exceptions mechanism.CC / @jesmrec @michaelstingl
Issues to have a look at
#1447
Code enhancements
MainApp.Companion
The text was updated successfully, but these errors were encountered: