Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 08-28-2011, 05:28 PM   #1 (permalink)
Registered Member
 
Join Date: Feb 2011
Posts: 14
Scrooby is on a distinguished road
Default Should I sync web service data?

Hi,

I'm building an iPhone app which displays food vouchers. The data is taken from a website via a .NET WCF service.

There are 3 main objects within the data model. 'Restaurant', 'Location' and 'Voucher'. A 'voucher' can have multiple locations and a location can have multiple vouchers. A 'location' can have only 1 'restaurant' but a 'restaurant' can have multiple 'location's.

I've started building the app search facility where you can search based on location etc. At the moment each search makes a call to the web service and returns the required data and stores it on the phone using Core Data.

When the user does another search, the stored data is cleared and re-added.

My concern is that when viewing the results, you are able to view the voucher, then view the restaurant that is assigned to that voucher. Then when viewing the restaurant, you can view the other vouchers that restaurant has. To do this, I would need to hit the service again to get the other vouchers.

I wonder whether I should be storing all of the data from the site using Core Data and then sync the data between the website and the app. This would mean that the search wouldn't need to call the web service.

I can see that this method would be better as not only would you not need to hit the service so often, the app would be less reliable on an internet connection.

However, my biggest problem with this is that when a user first downloads the app, they would need to get all the data that's stored in the website database. But if I have 2000+ vouchers, each with locations and restaurants, that would take quite a bit of time to download and store etc.

Is this the method I should be looking into, or is my current method workable?
Scrooby is offline   Reply With Quote
Old 08-29-2011, 02:00 AM   #2 (permalink)
Nuisance Developer
 
Join Date: Jul 2009
Location: Italy
Posts: 4,691
dany_dev is on a distinguished road
Default

it is a your choice (depend on your requirements) but I think that not saving (maybe just caching?) is usually the best way.
__________________
dany_dev is offline   Reply With Quote
Reply

Bookmarks

Tags
core data, ios, iphone, web service

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 387
5 members and 382 guests
JackReidy, jeroenkeij, Sami Gh, Yosh_K
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,671
Threads: 94,121
Posts: 402,903
Top Poster: BrianSlick (7,990)
Welcome to our newest member, JackReidy
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 04:48 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0