What is Clean Architecture?

Dr Milan Milanović
4 min readMay 11, 2024

The Clean Architecture philosophy emphasizes the importance of separating concerns in software design and creating modular, testable, and maintainable code. It was developed by a software engineer and consultant, Robert C. Martin, and introduced in 2012. in this blog post.

At its core, Clean Architecture promotes the idea that software systems should be designed to be understood and maintained by developers over the long term. To achieve this goal, Clean Architecture proposes a layered architecture with clear boundaries between different system components to achieve independence of frameworks, UI, databases, and delivery mechanisms and the possibility to test in isolation. Clean Architecture borrows ideas from Hexagonal Architecture, also known as Ports and Adapters, which emphasizes separating business logic from external dependencies. This architectural pattern facilitates easier testing and promotes flexibility by decoupling the core application from external frameworks and libraries.

The Clean Architecture philosophy defines a set of layers, starting with the most general and abstract layers and moving toward the most concrete and specific layers. These layers include:

  • Entities. The system’s fundamental objects represent the core business logic and data. They encapsulate the most general and high-level rules.
  • Use cases involve high-level interactions between the system and its users or other external systems containing application-specific business rules. This layer is not expected…

--

--