"Refreshing" an XML feed on iPhone/Mac OSX

Posted by Steve on Stack Overflow See other posts from Stack Overflow or by Steve
Published on 2009-04-29T14:19:31Z Indexed on 2010/05/15 19:54 UTC
Read the original article Hit count: 135

Filed under:
|
|
|
|

Hi all,

I'm curious for those of you who are building iPhone apps based on REST/SOAP/XML-RPC or simply pulling down a dynamic XML feed, what does it mean exactly to you when a user says 'refresh' the feed?

The straight forward way is to populate some collection, say an NSMutableArray, with whatever you bring down from the feed. If a widget on the UI is available to refresh, I typically do something like:

[myMutableArray removeAllObjects];
// follow steps to repopulate myMutableArray

It seems this is the least efficient algorithm for refreshing an XML feed. For instance many folks who are building Twitter clients, are appending changes to their existing feed, versus bringing down the entire feed in its complete form again.

What kind of algorithms are you using to "refresh" your models when speaking to a server-side data source?

Thanks all.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about cocoa