简体   繁体   English

在iOS开发中,与CoreData相比使用Parse Local Datastore有什么好处?

[英]What are the benefits of using Parse Local Datastore over CoreData in iOS development?

I am a new developer currently I am building an iOS app with a parse backend. 我是一名新开发人员,目前正在构建具有解析后端的iOS应用。

I need a cloud -based database so I can add new content to the app, but need to persist the user data so that even if they delete the app they can restore from their data. 我需要一个基于云的数据库,以便可以向应用程序添加新内容,但是需要保留用户数据,以便即使他们删除了应用程序,也可以从数据中恢复。

Could someone please explain if Datastore is a good replacement for CoreData? 有人可以解释一下Datastore是否可以很好地替代CoreData吗?

It makes sense to use the local datastore provided by Parse if you want to cache your PFObjects. 如果要缓存PFObject,则可以使用Parse提供的本地数据存储。

Because: 因为:

  • You can save the same objects into the local datastore as you use online 您可以在在线使用时将相同的对象保存到本地数据存储中
  • The performance is really good because you don't need to fill up your core data objects from your PFObjects (cannot cast from PFObject to a Core Data Object). 性能非常好,因为您不需要从PFObject填充核心数据对象(无法从PFObject转换为Core Data Object)。
  • The code is clearer (consistent) 代码更清晰(一致)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM