-
Notifications
You must be signed in to change notification settings - Fork 494
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
Store network requests in Realm #30
Comments
Hi @ranhsd there is example of caching data in |
Hi @sergdort |
I'm gonna close it then, if you'll have any questions feel free to reopen :) |
Hi @sergdort , In continue to this question...
And then to do it on the app side. First i use the network to fetch items and then use Realm to store them, if the app is not connected then i can directly use the database use case. What do you think? It is better to do it on the Network layer or on the App layer like i suggested? Thanks. |
I have exactly same question with @ranhsd |
Hi, guys! The only reason we have different platforms is the example app is to be able to have multiple concrete implementations of the same Domain. Typically in the real App we do not need to have multiple implementations for the same feature. So if it was a real app I would model it with only one For example, if we have a Where |
@sergdort If you model it with 1 domain per feature, how do you handle relationships? Can the domains know about each other? |
Hi,
I have a question related to architecture of view model.
Let's assume that I have a requirement to store network requests payload in Realm in order to be able to access data even if the user is offline. Currently in the example you show how to use Network or Realm or CoreData but not all together.
If i want to fulfill the requirement I need to do the following:
I think it can work but maybe there is a better way to achieve it. Maybe by creating an abstraction layer on top of it that will do the call (either to the server or to the offline database in case the user is online/offline)
What do you think ?
Thanks!
The text was updated successfully, but these errors were encountered: