Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MACloop

macrumors 6502
Original poster
May 18, 2009
393
0
Germany
Hello,
if you are about to create an app like one of the newspaper apps or something like that you have to get data and also let the news on the screen depend on thins data. How do I solve this in a effective way? Let say that I have a table with categories like The World, USA, Sports. If the user clicks on sports he gets ice hockey and football. By clicking on football he may se the results from football matches. Those results are the data updated. By a newspaper app there is a lot of data to get in order to show all the information. Where should I do my connection with the server? For every result object in the example above? At the beginning of the app start? I think of this as a tableView and the detailed view is just in one cell.
Any ideas and advice?
MACLoop
 

kyzen

macrumors regular
Feb 8, 2010
134
0
Colorado
Probably have to go with Web services.

Probably the best bet, either via a real web service utility, or faking your own (i.e., use a PHP page to spit out some XML containing the information you're looking for, and parse that out in your app).
 

MACloop

macrumors 6502
Original poster
May 18, 2009
393
0
Germany
thanks for your answers!
Ok, if I assume I have the XML file already - where in the app is the proper place to parse it? When the app starts or later on when that specific view is to be loaded? How do you think that apps like for news or things like that are structured? The reason for my question is to make my app as easy to use as possible for the user. To get and parse data is always taking som time.... and memory...
Thanks in advance!
MACLoop
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
Can you put up an indefinite progress indicator (you know the spinning one) and get and parse the data in the background. For bonus points you could display the data as it's parsed: one cell at a time. That way the user knows something is happening and if the item the want is the first one the wait the minimum time.
 

MACloop

macrumors 6502
Original poster
May 18, 2009
393
0
Germany
Can you put up an indefinite progress indicator (you know the spinning one) and get and parse the data in the background. For bonus points you could display the data as it's parsed: one cell at a time. That way the user knows something is happening and if the item the want is the first one the wait the minimum time.

That's cool! Thanks for the advice! I think I will try that out!
MACLoop
 

kyzen

macrumors regular
Feb 8, 2010
134
0
Colorado
If it's data that will be used the whole time the app is running, retrieve it at initialization. If it's data used on-demand (i.e., the user has to click a button to see "Sports" information), retrieve it at that point.

From an end-user perspective (and remember, end users are *******s who don't care about system limitations :D), I'd ideally like to have the app usable while the data is retrieving, so populating it one cell at a time would be good.
 

MACloop

macrumors 6502
Original poster
May 18, 2009
393
0
Germany
If it's data that will be used the whole time the app is running, retrieve it at initialization. If it's data used on-demand (i.e., the user has to click a button to see "Sports" information), retrieve it at that point.

From an end-user perspective (and remember, end users are *******s who don't care about system limitations :D), I'd ideally like to have the app usable while the data is retrieving, so populating it one cell at a time would be good.

Thanks alot for your ideas! You are certanly right about the system limitations and the end-users ;-) To make the app fast and roboust at the same time is very hard...
Again, I really appreciated your comments!
Thanks!
MACLoop
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.