DEV Community

Cover image for Clean Architecture—The introduction
Ronaiza Cardoso
Ronaiza Cardoso

Posted on

Clean Architecture—The introduction

Clean Architecture aims to separate the business rules or domain of an application from external resources like databases and frameworks. However, according to Rodrigo Branas, a more suitable name for it could be Clean Design, as architecture imposes constraints such as language and paradigm, while design involves defining responsibilities and their distribution.

Douglas Martin stresses that design is an unavoidable aspect of any project, and the only alternative to good design is bad design, not a complete absence of it. Even if someone not consciously attempts to design something, it will still be designed in some form, whether the result is a good or poor design.

Reinventing the wheel (or almost)

Rodrigo Branas explains that Clean Architecture does not invent anything new with its core principles. Instead, it builds upon concepts that were already introduced in Ivar Jacobson's software architecture books from the 1990s, specifically the use-case driven approach. The book isn't about reinventing the wheel, but rather refining and adapting existing concepts.

Ivar Jacobson's book introduced several key concepts that are still relevant today, such as the Entity-Boundary-Control (EBC) pattern. It involves separating the entity (the object representation), the boundary (the external consumer), and the control (the coordinator) to create a more modular and flexible architecture. By using this pattern, developers can create software systems that are easier to maintain and modify over time.

Core principles

According to Robert Martin, the core of your application is not centered around the database or any framework being used, but rather the use cases of your application. Achieving this requires the isolation of business rules, the definition of layers and responsibilities, and careful control of flow and dependencies within the application. By prioritizing these aspects, developers can ensure that the use cases of the application remain at the center of the development process.

Wrapping this up

This was just an introduction, providing background information on the book and its history. In a subsequent post, I plan to delve into the key concepts presented in the Clean Code Architecture course by Rodrigo Branas, including enterprise and application business rules, interface adapters, and frameworks and drivers. These concepts are going to be a big part of what we do as developers on a day-to-day basis.``

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post