Clean Architecture in Android — A Beginner Approach

Nicola Gallazzi
The Startup
Published in
6 min readJan 9, 2021

--

As a developer, I’ve always been fascinated by architectures and clean code in general, even before I decided to become a native android developer.

The goal of software architecture is to minimize the human resources required to build and maintain the required system

However, writing code that is easy to test, maintainable and that facilitates team collaboration on the code can be hard.

Robert Martin (a.k.a. Uncle Bob) has theorized a solution to reach these goals, writing three books about taking a “clean” approach in the software development world. One of these books is called “Clean Architecture, a Craftsman’s Guide to Software Structure and Design” and inspired the writing of this article.

Yes, but I already have my MVVM architecture in my app, why should I bother?

Well, probably if you are working on a simple project Clean Architecture might seem overkill, but what if you need to decouple modules, testing the modules in isolation, and helping your team to work on separated code containers? Clean Architecture helps developers to avoid spelunking through the software code trying to figure out functionalities and business logic.

A bit of theory (not much I promise)

Clean architecture layers

--

--

Nicola Gallazzi
The Startup

Android Developer with a true passion for clean code. In love with Kotlin. Former Udacity mentor and code reviewer