문제

I am trying to build a mobile application on which a user could buy products from the application, I want to know if would be advisable to fetch data from web service or store it locally like in a plist file in case of IOS.

If i fetch data using a web service would it affect the performance?

Or what is the best way in which i can implement a web service in IOS.

Advice on this would be highly appreciated.

도움이 되었습니까?

해결책

A commerce app typically has components such as catalog, cart, checkout and payments. Since you're talking about a mobile shopping app, I'd recommend you to use Core data for your Catalog because there are very less chances of products and categories being modified and that's the section of the app that's accessed most frequently. It'll make the app load faster and you'll have to make fewer network calls which in turn improves the performance of your app. You can fetch Catalog data once a day from your server or whatever time sounds more reasonable to you but fetching and updating cart, making payment, checkout etc. must be handled on server side for which you'll be required to use a Web Service, every time they're accessed.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top