This article by Google is "good"(not worth) explanation how android application should looks like. Even with this understanding of architecture AOSP applications, which should face best practices, show that there are possible to write code without any ideas that other people can read it.
The most important thing you should focus on is the separation of concerns in your app. It is a common mistake to write all your code in an Activity or a Fragment. Any code that does not handle a UI or operating system interaction should not be in these classes. Keeping them as lean as possible will allow you to avoid many lifecycle related problems. Don't forget that you don't own those classes
they says, but do what they do. I work under app which should be delivered to custom ROM based on AOSP, and I want to proceed with MVP pattern(even based on Google patterns reference). My concern is that existing apps in this ROM has same architecture as AOSP apps(no architecture as well) and the reason - they was designed based on AOSP apps ideas. So, my questions is, does some one know "open-source" projects based on AOSP which contain clear architecture(MVP, MVC, MVVM) apps inside. Also interested in Gradle config for them(looks like Google promote Android Studio but use Eclipse for AOSP). It can be used like reference(proof) for developers ant managers as a "good practice", who involved to such kind development. Or all this architecture patterns for PlayMarket apps only and have no sense for AOSP ? Thanks
Aucun commentaire:
Enregistrer un commentaire