The web service sends data to the iOS client, and the client displays the data using a UITableView.
Data is usually a built-in whiteboard, a text list. It is sent from the web service via json format. (sometimes XML)
It does not need to be updated in real time, but I do not want to block the user interface due to the loading of the web service.
There are many ways to implement it, which one is right for you? 1 or 2.?
UITableViewController processes the json object.
A simple way, but it can be difficult to encode.
Use CoreData as a local database.
There's a local article repository, when json data comes from a web service, it updates the local CoreData repository. (download asynchronous web service)
and the UITableViewController <> handles the update of the local CoreData repository and updates the UITableView with animation.
I think the second way is better to implement without spagenia code, but I'm afraid there is another performance problem, or is this not really stupid code?
Friends, how do you usually use a list of data from a web service?
Other comments:
I found a SeismicXML example from the Apple SDK, this is a well implemented example of method 1.
but I think it can be easily implemented using CoreData as a local repository.
What do you think of this strategy?
source share