Most Android architecture discussions center around one pain point: maintainability. After months of hard work, the team is ready to push the changes live to Google Play. Everything seems to be going well. Then business requirements change.
“Add an EditText widget to the home screen,” they say. Simple enough, you add the EditText. “Can you modify the app to use a new API endpoint?” A little more complex, but you comply. This can go on and on. When does it stop?
For most developers, unfortunately, the answer is never. Requirements are constantly changing, and developers need to react quickly and efficiently as business requirements change.
How can we create Android apps that are easy maintain? The true answer is long and complex, but can be summed up in a few words: use common design patterns and stick to an architecture like MVVM or MVP. Make use of standard libraries and frameworks like RxJava, Dagger, Android Architecture Components and Picasso.
There is there is always a cost — or tax — associated with developing and maintaining Android apps:
- The cost of creating
- The cost of maintaining
- The cost of deploying
If Google Play is the distribution model, number 3 is basically nothing. Number 1 is what Android Developers focus one, because the app needs to ship yesterday. But maybe developers should focus on number 2. Can you successfully add a feature to the app with little effort? can you do it 6 months from now? a year from now?
In this series, we will explore clean architecture for Android, because the goal is, and has always been, to create apps that are easy to create and maintain, so that it has a healthy lifetime.