0

I already have a django application and am trying to develop an iPhone app. I'm using mysql as the database for the django app.

Here are some questions I was having :

  • Is it necessary to use Core Data for anything?
  • Can I create a rest api to interact with the mysql database?
  • If so, would there be any advantage, at any place or reason, to use Core Data in addition to mysql. For example, for an app like Pinterest, Tumblr, Facebook, etc. are they using Core Data at all? If so, why and how?
4

2 回答 2

1

Core Data 是在手机上为您提供本地数据库的一种方式。服务器上只有 MySQL,应用程序在离线时无法访问任何数据。即使在仅限在线的应用程序中,一些数据的本地缓存也有助于加快速度。

于 2013-06-10T04:08:32.793 回答
0

与 Django 类似,它有一个数据库抽象 API,可以让你创建、检索、更新和删除对象,iOS 有一个 CoreData。底层仍然是 SQL。从 django 端,您需要创建一个返回对象类或其他东西的 api。在 iOS 端,您必须调用此 api 并解析数据并使用 CoreData 将其保存在本地。

希望这可以帮助..

于 2013-06-10T06:39:37.693 回答