aspnetrun/run-aspnetcore-realworld

Class placement issues according to Clean Architecture

Opened this issue · 0 comments

Hi,

Interesting project! Have a couple of questions concerning some choices in the project.

Placing the IAppLogger interface in the Domain layer does not seem aligned with the typical responsibilities of the Domain layer in Clean Architecture. The Domain layer is primarily responsible for encapsulating the core business logic and domain entities. Logging is generally considered an infrastructure concern, and exposing logging interfaces in the Domain layer could violate the separation of concerns.

Why did you place that interface in the Core/Domain layer?

Also, Application Layer usually defines interfaces that are implemented by the outer layers, so why are repository interfaces inside the Core Layer and not the Application Layer? You seem to implement them in the Infrastructure layer as recommended so I'm not getting this choice.

Thank you