开发者

How to deal with data when building website like app? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
开发者_开发百科

Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.

Closed 9 years ago.

Improve this question

I need to create an app that does some communication with a server.

My app must post some requests to server, to aspx webservices. Then get back some JSON/XML response.

The question is do I need Core Data?

IMHO it would be enough to have a UIViewController with text field items and to perform submit to provided server webservice URL. The result could be processed with some Json/XML parser library and showed in UITableViewController.

So, I not sure do I have to use Core Data? And why? :)


No you don't have to use core data in order to communicate with a web service/JSON service - you can do exactly as you describe. The only need for core data is if you want information you download from the web service (or created by the user during the session) to remain available between hard shutdowns of the app. (or be available when you have no internet connection)


I'm not sure you understand what core data is.

Core data is a way of communicating to localised sqlite databases without using sql code (as it were). It effectively creates objects that you can use to manipulate and use databases.

To download and post data to and from the internet you don't need to use it at all, unless you want to store the data when you would use it to download the data and store it in a localised database for use later.

A better way to do this though would be to just download the XML/json file directly to the working directory of the app and use it from there (if you want offline/cached use from it).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜