You don't have access to this class

Keep learning! Join and start boosting your career

Aprovecha el precio especial y haz tu profesión a prueba de IA

Antes: $249

Currency
$209
Suscríbete

Termina en:

2 Días
21 Hrs
16 Min
56 Seg

Clean Architecture

8/24
Resources

What is Clean Architecture?

Clean Architecture, known as one of the backbones of modern software design, was introduced by Robert Martin in 2012. This architecture seeks to keep the code structure clean, organized and separated by layers. Not only is it relevant for technical design, but it is also crucial for facilitating scalability and long-term software maintenance. For any software developer or architect, understanding Clean Architecture is vital to creating robust and flexible software.

What are the layers of Clean Architecture?

Clean Architecture is structured in four core layers, each with a specific purpose ranging from the purest abstraction to the most concrete details of the system.

  1. Entities: This is the most central layer and is composed of business rules that are common to multiple applications. Entities are defined here, which are the core of the system and contain the most general and essential logics of the application. Although these rules are general, they are critical to define the core functionality of the software.

  2. Use cases: Above the entities are the use cases, which represent more specific business rules. These use cases are designed to fulfill particular functions of the application and act as the guide for user interactions with the entities. The next unit will provide a more in-depth discussion on their utility and specific functionality.

  3. Interface Adapters: These act as bridges between the more general elements of the core application and the specific technical details. They have the function of translating and adapting information so that it can be used effectively by use cases and entities. A common example is MVC applications in web systems.

  4. Frameworks and drivers: This is the outermost layer and contains the specific details of the system, such as databases, file systems, and the web. Frameworks and drivers are necessary for the application to interact with the outside world and provide the infrastructure necessary for the entire system to function.

What is the historical and modern role of Clean Architecture?

Clean Architecture was first described in an article by Robert Martin in 2012, and shortly thereafter expanded upon in a book by the same name. Available in several languages, this book has become a fundamental reference for the study of software architecture. It not only addresses the core concepts of Clean Architecture, but also makes an effort to homogenize ideas from architectures such as hex and onion.

The great challenge in implementing Clean Architecture is to address the gaps that arise in practice. Although the model provides a solid foundation, challenges often arise when actual implementations diverge from the theories in the book. Over the years, engineers and architects have worked to fill these gaps, providing their own solutions tailored to specific projects.

What to consider when implementing Clean Architecture?

  • Flexibility: When designing software with Clean Architecture, a high degree of independence between system components should be sought.
  • Maintainability: Clear separation of responsibilities helps to facilitate system maintenance and upgrades.
  • Evolvability: Allows the software to easily adapt to new needs without compromising the quality or integrity of the code base.

Clean Architecture, in essence, seeks the unification of different paradigms into an architecture that is adaptable and easy to maintain. Although it can be challenging in its first steps, it offers architects and developers a path to creating software of high and lasting quality. Reading Robert Martin's book can be an excellent starting point for those who want to delve deeper into this methodology!

Contributions 3

Questions 3

Sort by:

Want to see more contributions, questions and answers from the community?

Clean Architecture

Existen las siguientes capas:

  1. Entidades: Capa central, son reglas de negocio que aplican a nivel empresarial y que son comunes a múltiples aplicaciones.
  2. Casos de uso: Reglas de negocio más específicas de la aplicación.
  3. Adaptadores de interfaz: Son el puente entre elementos muy específicos o detalles hacia lo que entendemos en el core de nuestra aplicación, principalmente en los casos de uso y las entidades.
  4. Frameworks y drivers: Detalles puntuales del sistema, tales como la base de datos, la web, sistema de archivos y todo lo que ocurre allí será convertidor por la capa previa para que pueda ser utilizada por los casos de uso y las entidades.

Datos adicionales:

  • Fue descrita por Robert Martin en 2012.
  • Se apoya en las ideas de la arquitectura hexagonal, cebolla y otras.
  • El mayor reto que tiene es que presenta huecos en su implementación, por lo que se busca tener una apreciación por parte de diferentes arquitectos de software para llevarla a cabo.

Caracteristicas:

  • Entidades: serían las reglas de negocios y formarían nuestro núcleo.

  • Casos de uso: serían una capa más alta y contendrían reglas de negocios más específicas que se complementan con las entidades.

  • Adaptadores de interfaz: serían una capa externa y se encargarían de hacer el puente entre elementos específicos y el núcleo de nuestra aplicación (las capas anteriores).

  • Frameworks y controladores: serían una capa externa donde se encuentran los detalles específicos de nuestro sistema.