Skip to content

Golden Rules of a Good Architecture

Arundhati Gupta edited this page Jan 19, 2020 · 2 revisions

A good architecture should do the following:

1. Satisfy a multitude of stakeholders: Organize your code in a way that a developer who currently works with, say, the UX designer can manage only the stuff related to the UX. So, all interactions are separated in the classes/modules/components/whatever whose job is interactions, and that particular developer works only on those components while working on the UX part of the app.

2. Encourage separation of concerns: Separation of concerns, or the single responsibility principle, says that every component should have only one reason to change.

3. Run away from the real world (Android, DB, Internet…): Emphasize business logic and leave framework details under the hood.

4. Enable your components to be testable: Test your app as much as possible and your architecture should allow you to do it. If you can’t unit test everything, you should at least cover your business logic with tests. Separation from the real world goes nicely with this. It’s easier to test your business logic if it is clearly separated from the rest of the app.

Reference: The above points have been taken from this blog on Android Clean Architecture.

Clone this wiki locally