Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6068741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:44:51+00:00 2026-05-23T09:44:51+00:00

I come to iPhone programming from a web development paradigm and am having a

  • 0

I come to iPhone programming from a web development paradigm and am having a bit of a problem understanding how to design my iPhone application.

The crux of my question is: How much data do you load into your model and when do you load it with data from the database?

In the web apps I’ve created, the objects on the server-side are filled by the database based off form values supplied by each request. Take the example of a simple list. You click a list value, the id for the list is sent to the server (query string), the server loads an object for just that list item, server-side code uses the object, and then destroys it before the page is returned to the user.

With iPhone apps (or I guess any app where objects persist), you could load all the list item objects into a singleton dictionary from the database before the user ever interacts with them. Then you never have to go back to the database when the user clicks on a link. You just load the object from the dictionary.

Alternatively, you could design it like a web app and just go back to the database each time and fill the object with the data requested.

Can you give me any guidance on when to use one way over the other? When do I load the data? I’m tempted to just load a bunch of data when the application starts up so that I never have to go back to the database. But this feels dirty.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T09:44:52+00:00Added an answer on May 23, 2026 at 9:44 am
    • For static data that isn’t too large, loading it all at startup works.
    • In one of our products, we do this for simplicity on one of the tables (we don’t expect more than a few thousand rows) and load the other table lazily (high-res images). This is a reasonable option if you don’t have background threads also accessing the database.
    • Core Data does batched lazy loading (i.e. it will load a batch of result rows at once).

    Sidenote: Writes using Core Data and an SQLite store seem exceptionally slow, to the extent that we moved processing to a background thread to avoid blocking the UI (and this is for not very much data at all) and gained some annoying concurrency issues as a result. Sigh.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've come over from experimenting with android to Iphone development. so i'm having a
I come from heavy web application dev background, and having some problems representing my
I've been iPhone programming for 6 months and come from a PC/Java/Eclipse background and
I'm kinda new to Objective-C and iPhone development and I've come across a problem
I'm pretty new to iphone programming. I have come up with a problem when
I'm on a project doing an iPhone application. We had a Cocoa consultant come
I am new to iPhone programming and working on my first real application (i.e.
I have been trying to send .png images from iPhone to web service. I
I am going to attempt to teach some iphone application development at my job,
I've come from iPhone background and am writing an android app. I've got a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.