Best practice for HTTP Data Source
Hi!
I need some help regarding best practice for my first "real" app. It is a tab-based app with ListViews. These ListViews are loaded with contents from a HTTP Get-request to my webserver. ListView cells contains Title, Subtitle, CellImage and a description for the detailed view (when a row in a ListView is clicked). All and all it is quite similar to a RRS news reader.
My questions concern data storage for the result from the HTTP-request and the format in which to send the result.
1: Shall I make my webservice return a plist-file contaning the data when a app sends a request, because it is simple to store and work with plists in X-code?
2: Is there any advantage to return result as "regular" XML and parse the result in the app? And if so, how do I best (simple and effective) store the result between sessions when the app is used (plist? XML? SQLlite)? . I want the content to be persistent in the app in case it is launched without internet connection. It will however be refreshed/replaced if possible when the app is launched.
3: What is the best way to return images together with the result? Images is shown both in the ListViews (thumbs) and in the detailed view. Do I request each image file with a separate HTTP Get-request or shall I return them encoded like i.e Base64 (text) inside the result XML. Atleast the thumbnails needs to be persistent between app launches.
Iīm not asking for example-code here (unless there are tutorials for this), just pointers on how to plan my app. How would you do it? It is a simple app and I am still learning so please donīt make it to complex =D
Hope you have time to help me, Thanks!
/Kalle, Sweden
|