reza
reza

Reputation: 1508

Clean Architecture. UseCase usage?

I was wondering what is the exact application of UseCase in Clean Architecture. Since, nowadays when you have a remote data source or rest API, the heavy processes are done on the server-side so you don't have any logic to implement in UseCase. All logic is state management, to handle loading errors, etc. and these have to be inside state management. Am I wrong? Do you have a scenario where UseCases are needed?

Upvotes: 8

Views: 6861

Answers (1)

Faruk
Faruk

Reputation: 5821

Imho even though there is hardly any logic to implement in UseCase, for example just passing params. Creating useCase will allow us freely change the repository based on our needs. For example, different apps use different logic in the repository.

Clean Architecture benefit is not only about layering logic, but how to increase reusability, testability, and scalability (easier to change and modify in the future)

Upvotes: 4

Related Questions