Skip to content

This is top 5 Clean Architecture usecase mistakes that we must avoid

License

Notifications You must be signed in to change notification settings

raheemadamboev/usecase-5-mistakes

Repository files navigation

usecase-5-mistakes

This is top 5 Clean Architecture usecase mistakes that we must avoid.

  1. The UseCase should have only single responsibility and one public function. Link

  2. The UseCase should contain only business logic. It should not contain any other logics such as presentation logic. Link

  3. The UseCase lives in Domain layer, so it should only contain pure language packages. The UseCase should not contain any third-party or framework related packages. Link

  4. Abstraction is necessary when we intend to implement multiple versions of it. Link

  5. Deciding what error message to display is responsibility of Presentation layer. Link