The project was developed with the aim of studying and applying the concepts of Clean Architecture using .NET Core. The goal is to structure an application in a modular and decoupled way, promoting the separation of responsibilities and code maintainability. The project also includes the implementation of microservices to further enhance scalability and maintainability.
Additionally, the application performs CRUD operations in a scenario where project monitoring is required, with responsibilities for tracking project progress and the users involved.
Wiki - Hire have more about patterns, performance, system design , decisions and queues.
{
"ConnectionStrings": {
"DefaultConnection": "Server=localhost;Database=your_db;User=your_user;Password=your_password"
}
}
Clean Architecture, proposed by Robert C. Martin (also known as Uncle Bob), aims to create systems that are independent of external details such as databases and frameworks. This facilitates changing parts of the system without impacting others, promoting a cleaner and more organized code structure.
- Dependency Inversion: Dependencies should always point to abstractions and never to concrete implementations.
- Layers: The system should be divided into layers, each with a specific responsibility.
- Testability: Each component should be independently testable.
A clear separation between the presentation, application, domain, and infrastructure layers facilitates maintenance and evolution of the system. Each layer can be modified or replaced without impacting the others, making the system more modular.
By avoiding direct dependencies on frameworks, we can easily swap out the underlying technology without affecting the rest of the system. This is especially useful in an environment where technologies are constantly changing.
Clean Architecture allows for more effective automated testing. Each layer can be tested in isolation, resulting in a more robust and reliable test coverage. Using mocks and stubs becomes simpler when dependencies are injected.
Defining interfaces for dependencies helps decouple different parts of the system. This not only promotes cleaner code but also facilitates the implementation of new features or the replacement of existing components.
Maintaining a clear flow of data between layers is essential. Communication should occur in a way that dependencies flow from the outside in, following the principle of dependency inversion. This helps to avoid coupling issues.
Live Coding: Clean architecture na prática com Rodrigo Branas
Clean Architecture: descubra o que é e onde aplicar Arquitetura Limpa