Quantcast
Channel: Active questions tagged use-case - Stack Overflow
Viewing all articles
Browse latest Browse all 81

Use cases vs Domain vs Repositories: Where should the business logic reside?

$
0
0

Upon using Clean Architecture for multiple Android projects, I always stumbling with a temptation on where is the best location to put the business logic. Based on my understanding Domain Model holds some business logic and value objects that solves problems like formatting or encoding, Use Cases on the other hand provides the "Screaming Architecture" concept to make actions and processes more readable in a business perspective but in abstract. There is also Repositories that are responsible for transmitting/receiving or storing data but can also have business logic in it.

My questions are:

  1. Is it possible for Use Cases to have business logic as well? If yes what kind of business logic it can have?
  2. What kind of business logic Repositories usually have aside from transmitting/receiving or storing of DTOs?

Viewing all articles
Browse latest Browse all 81

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>