Myapp uses a remote API to update its data, and it has to work offline, so all the data has to be downloaded before showing the main section of the app.
The API returns one big JSON structure representing the content of the app. The JSON is converted to many dictionaries and arrays, then model classes are instantiated and are backed by these dictionaries and arrays.
My problem is that some of these dictionaries and arrays contain URLs for images that also have to be downloaded. Should it be the responsibility of each model object to download its own images? Or should I have some kind of controller class that handles this?
Also, what would be a good approach to handle this? For example, how do I know when all model objects have finished downloading their resources?
All the resources must be uploaded upfront as the client would like to be able to use the app without an internet connection.