Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UseCase dependencies #20

Open
nikolajakshic opened this issue May 15, 2018 · 2 comments
Open

UseCase dependencies #20

nikolajakshic opened this issue May 15, 2018 · 2 comments

Comments

@nikolajakshic
Copy link

I thought UseCases shouldn't have any framework dependencies but PlayMovie has a Context in it and a Navigator which contains android specific code. I'm a little bit confused, am I missing something?

@android10
Copy link
Owner

Those are implementation details which inherit the abstraction UseCase which is what from my perspective belongs to the domain layer.

Otherwise, I do not see any other way to achieve those actions through UseCases.

@dhaksddj
Copy link

Use cases should live in the domain layer and be free of framework code. The domain layer should be free of framework code!

The way round this issue is to create an interface for the Navigator, just like we have interfaces for repositories. The implementation of the Navigator would be in app most likely where it can use the context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants