app with data from server

Discussion in 'iOS Programming' started by MACloop, Feb 16, 2010.

  1. MACloop macrumors 6502

    Joined:
    May 18, 2009
    Location:
    Germany
    #1
    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
     
  2. AndyCodez macrumors regular

    Joined:
    Aug 6, 2009
  3. kyzen macrumors regular

    Joined:
    Feb 8, 2010
    Location:
    Colorado
    #3
    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).
     
  4. MACloop thread starter macrumors 6502

    Joined:
    May 18, 2009
    Location:
    Germany
    #4
    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
     
  5. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #5
    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.
     
  6. MACloop thread starter macrumors 6502

    Joined:
    May 18, 2009
    Location:
    Germany
    #6
    That's cool! Thanks for the advice! I think I will try that out!
    MACLoop
     
  7. kyzen macrumors regular

    Joined:
    Feb 8, 2010
    Location:
    Colorado
    #7
    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.
     
  8. MACloop thread starter macrumors 6502

    Joined:
    May 18, 2009
    Location:
    Germany
    #8
    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
     

Share This Page