You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m seeking advice on how to properly separate layers when working with dependencies. For example, I have an API client that should belong to the data layer, but I don’t want the domain layer to interact with this API client directly. To address this, I’ve created a repository in the domain layer that interacts with the API client. However, the issue is that the repository definition needs to be in the domain layer, while the implementation should be in the data layer.
What is the best approach to handle this scenario?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello everyone,
I’m seeking advice on how to properly separate layers when working with dependencies. For example, I have an API client that should belong to the data layer, but I don’t want the domain layer to interact with this API client directly. To address this, I’ve created a repository in the domain layer that interacts with the API client. However, the issue is that the repository definition needs to be in the domain layer, while the implementation should be in the data layer.
What is the best approach to handle this scenario?
Beta Was this translation helpful? Give feedback.
All reactions