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

  • SEARCH
  • Home
  • 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 6219071
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:42:58+00:00 2026-05-24T07:42:58+00:00

I just want to get a few pointers on the best way to architect

  • 0

I just want to get a few pointers on the best way to architect my first Core Data app, and the main objects and interactions I will require.

The data is stored remotely and I will need to access it via HTTP and it will respond in JSON format. I want to cache this on the device using Core Data. Each day there will be new data on the server, so I need to access this and update the Model accordingly.

Are there any SDK classes I can use to help me with this, or am I going to hand roll it?

I guess I’m looking at a Model Controller that I call to get the data, it will return the core data cached data and maybe make a background call to the web service to get latest data too and then notify the view that there is new data. When I get the data from web service in JSON format – i will need to map this to ManagedObjects an add to my core data context.

  • 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-24T07:43:00+00:00Added an answer on May 24, 2026 at 7:43 am

    Thanks dtuckernet, here is what I did do – gathering info from lots of sources, which I believe is the best solution. Anyone feel free to criticise (constructively)….

    1. I have my Core Data stack in CoreDataStack.h (singleton) – not entirely necessary, but it unclutters my app delegate class.
    2. I have a base CoreDataBackedTableViewController : UITableViewController
    3. Each of my table view screens extends CoreDataBackedTableViewController and have an ivar to a ModelController class.
    4. An example ModelController class has a – (NSFetchedResultsController *) getData method which constructs the NSFetchedResultsController (also keeps a ref to it) and returns it to the view controller which also stores it in CoreDataBackedTableViewController (which listens for updates and edits to the data). Having the ModelController class allows me to encapsulate my data access to potentially have 2 different view controllers use this (iPhone and iPad perhaps)
    5. In getData – i make a call to my backend webservice asynchronously. Using delegates for callbacks
    6. The backend is using SBJSON for parsing and NSHttpConnection and a hand rolled HttpService class.
    7. When the backend returns with data, it calls the delegate on the ModelController which updates core data – and my fetchedResultsController knows about this and automatically updates my interface ! How cool is this bit – not a lot of effort involved on my part. I have to do some detection on whether i’ve already downloaded the data before or not to avoid duplicates.
    8. Ready to roll this out to the rest of my app….

    If anyone wants any clarification on any of the steps, just let me know.

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

Sidebar

Related Questions

Hey guys, I have a CS exam tomorrow. Just want to get a few
For a blog like project, I want to get the first few paragraphs, headers,
I just want get a 2 dimension array of List in c#. In my
I just want to get a selector name, and the arguments, sender, or an
I just want to get a quick htaccess redirection. ie: domain.com/subfolderGreen --> domain.com/index.php?folder=subfolderGreen (note
I just want to get the System IP address and display it on a
I just want to get numbers of times to be used for each Activity.
I just want to get email id of user having phone number given. so
I just want to get the total days in a list of dates. Here
Say you just want to get rid of the changes you've made to one

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.