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

Where do WorkManager, JobScheduler Fit? #61

Open
KwabenBerko opened this issue Dec 6, 2020 · 2 comments
Open

Where do WorkManager, JobScheduler Fit? #61

KwabenBerko opened this issue Dec 6, 2020 · 2 comments

Comments

@KwabenBerko
Copy link

KwabenBerko commented Dec 6, 2020

Usually, in apps, there are some tasks that we run in the background, such as syncing of data, analytics etc. Google suggested to use deferrable components such as WorkManager and JobScheduler in such instances.
Where do these components fit in Clean Architecture?

@KwabenBerko KwabenBerko changed the title Where do WorkManager, JobManager Fit? Where do WorkManager, JobScheduler Fit? Dec 7, 2020
@edasich
Copy link

edasich commented Jan 30, 2021

I have got really confused too.
If we make another layer, called worker layer like device layer.
Does worker layer suppose to work with data layer directly ? If yes, there would be some business logic in worker layer that is not good.

@KwabenBerko

@KwabenBerko
Copy link
Author

KwabenBerko commented Feb 7, 2021

I only ever use just 3 layers, at least 80% of the time(presentation, domain, data).
Also, I ended up putting my WorkManager implementation behind an abstraction and placed it in the data layer.

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

No branches or pull requests

2 participants