3 ms·
1. Be very skeptical about anything coming out of the Android UI toolkit team, especially ViewModel, LiveData, Navigation Component and Pagination Component. Yo
by tsss 4y ago
1. Be very skeptical about anything coming out of the Android UI toolkit team, especially ViewModel, LiveData, Navigation Component and Pagination Component. You can do better.
2. Koin is not a DI framework.
3. Avoid KAPT (at least in development builds). It's slow.
4. If you think about your UI as a state machine, this state machine _must_ be total. For all intents and purposes, any possible input can arrive in any possible state due to how the Android event loop and view callbacks work and you must handle it gracefully.
5. Your app can be killed and state restored, partially restored or not restored at any point in time (yes, even if you disable config change) and you must handle it gracefully.
6. Be mindful of energy saving and background tasks. The logic for background work changes frequently and manufacturers do not abide by the standards.
7. Do not blindly implement MVI or similar architectures because you read about it on the Spotify blog. Read research papers and in-depth material from the web dev community. They're always about 5 years ahead of the Android community.