Select Page
Share

By Rodrigo Werlang *

Building software that has quality attributes that increase its reuse and guarantee a simplified evolution and maintenance has always been a technical challenge for many application development teams. Especially when a product is born in a startup environment, where everything needs to be thought to achieve immediate goals and, as the business grows, the products grow and mature as well.

With the advent of microservices-based architectures, defining a robust and sustainable architecture in the long term has become even more complex. This is because it involves many aspects of communication, resilience and other common themes in distributed systems. The software design and architecture stage has become fundamental, so that principles, patterns, technologies, functional and non-functional quality attributes are all established with the focus on creating an architecture that survives the natural changes that will be required. These changes may exist due to business needs or the emergence of new technologies, which is where the application of the Clean Architecture philosophy using design patterns starts to make a difference.

With this approach, it is necessary to understand that the architecture of a software product can be classified differently depending on the angle at which it is analyzed. Like, for example, the deploy architecture, or the logical architecture, both of which can still have several different levels of abstraction. The point of view in focus here will be that of the logical view of the architecture of a particular microservice. Clean Architecture can be understood as a software design philosophy that separates design elements into ring-shaped layers, where dependencies can only come from the outer levels inward. This conceptual architecture model produces systems that are: framework independent, easy to test, independent of UI (user interface) and database independent.

When applying clean architecture, each layer in the software project has a well-defined responsibility, following the rule of the first SOLID principle (SRP - Single Resonsability Principle; OCP - Open / Closed Principle; LSP - Liskov Substitution Principle; ISP - Interface Segregation Principle ; DIP - Dependency Inversion Principle), which is the Single Responsibility Principle. The strength of this architectural model is the fact that it has the domain core, or the business layer, as the center of the architecture, which is fully aligned with the concept of DDD (Domain Driven Design), widely used to define the context and boundaries responsibility of each micro service.

Clean Arquitecture is a robust, community-proven software design model for creating software that is flexible enough to support evolutions and maintenance over time, because it employs many of the modern object-oriented principles and allows you to create systems with low dependency between the layers and components.

Regardless of the architectural model chosen for the logical design of your software project, the most important thing is to take into account that each layer has low coupling and high cohesion, that the classes are organized in such a way that they have a single responsibility and that, among other things, it is easy to add tests without the need to create complex environments and that require a high effort to be implemented.

* Rodrigo Werlang, CTO and Head of Software Engineering Paradigma Business Solutions

Warning: The opinion presented in this article is the responsibility of its author and not of ABES - Brazilian Association of Software Companies

quick access

en_USEN