Clean Architecture

Summary

First of all, let me clear this, This book is not about following some specific patterns like MVP, MVC, MVVP or MVI. This is more about how to architect and dividing the responsibility in a way where they change for the same reason.

The major skills to master as an architect is where to draw boundary lines and managing dependencies. Clean Architecture is nothing but a structure that is very easy to change and refactor.

The simplest small example which comes to my mind is when we have smilier POJO/Model classes for database and API. We quickly think that they are exactly the same and can leverage the DRY principle here and then it ended up with one class for both database and API. In reality, both should be separate classes because of the database and API change for different reasons. Believe me!! I’ve been to this place. Things get uglier and uglier as the app grows and features are piled up.

A Good Architect should know these 3 things
1. SOLID Principals and when to apply them.
2. Dependency Management.
3. Understanding what not to do is more important than what to do.

And always remember one thing. No matter how bad the codebase or architecture is. Rewrite from the scratch won’t solve the problem. Refactor it piece by piece.

Author

Robert C. Martin
Website

Site Footer