跪拜 Guibai
← All articles
Android

Every 'Best Practice' Android Taught You Eventually Gets Overturned

By 潜龙勿用之化骨龙 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Maintaining a mature Android codebase means living with multiple generations of official guidance that Google itself has deprecated. This piece names that experience and makes the case for architectural humility: plan for replaceability rather than permanence, because the 'best practice' label is provisional.

Summary

Android's official guidance has a long history of self-contradiction. The article walks through async: hand-rolled threads gave way to AsyncTask, which was deprecated into a memory-leak cautionary tale; RxJava's promise of a new mindset turned into debugging nightmares; coroutines then killed the premise that async must be complex by making it a language-level feature. Architecture patterns followed a similar arc: MVC, MVP, MVVM, MVI, and Clean Architecture each had their moment as the prescribed answer, each with its own trade-offs.

The point isn't that any of these technologies were mistakes. They each fit the assumptions of their era. The real pattern is that the industry treats each new official solution as the final word, then abandons it when the next one arrives. In a mature Android project, all these layers coexist, running simultaneously, and none of them is 'wrong.' The author's conclusion is to stop chasing best practices and instead evaluate tools on whether they allow change, support coexistence, and can be replaced.

Takeaways
— AsyncTask became the canonical memory-leak example and eventually deprecated.
— RxJava's steep debugging cost showed that power does not equal team suitability.
— Kotlin coroutines changed the async war by making sequential code the default and structured concurrency a language feature.
— The architecture patterns MVC, MVP, MVVM, MVI, and Clean Architecture solved problems from different stages rather than being linear replacements.
— A mature Android project can legitimately run all these technologies simultaneously.
— The author's test for any tool: does it allow change, support coexistence, and can it be replaced?
Conclusions

The history shows that official Android recommendations operate on an endorsement-and-reversal cycle, so treating any of them as a permanent contract is a mistake.

When Google endorses a solution, the engineering community converts it into a form of identity, which makes the next reversal feel like a personal betrayal rather than a normal evolution.

The pattern across async and architecture suggests that the cost of migration is usually carried by developers long before the platform's official position changes, making 'best practice' a lagging indicator.

From the discussion

The churn in Android best practices reads as an inherent property of engineering, not a historical accident: each new framework or architecture is simply the response to whichever problem is current, so yesterday's doctrine was never meant to stick. Telegram's fragment-free codebase keeps that abstraction honest, since the officially blessed stack clearly was not a prerequisite for a large, successful production app.

— The parade of overturned best practices is not evidence of failure but case-by-case problem-solving; every official recommendation stays provisional until the next problem arrives and forces another revision.
— Telegram ships without fragments, so the endorsed stack never held a monopoly on viable production design, and the two stances conflict over whether the churn is unavoidable — keep adapting — or escapable — build on what actually works and ignore the endorsements.
Featured comments
Android打工仔 2 likes

This is a process of constantly solving problems.

冬天里的Java 1 likes

Telegram doesn't use fragments at all.

See top comments, translated →
Source: juejin.cn ↗ Google Translate ↗ Backup ↗