text Swift存储库模式

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text Swift存储库模式相关的知识,希望对你有一定的参考价值。

https://medium.com/@dcordero/data-sources-in-swift-or-how-to-avoid-that-this-new-trendy-persistency-framework-determines-the-5472fcb75eda

Data Sources in Swift… or how to avoid that this new trendy persistence framework determines the architecture of your App
There are really good frameworks to deal with the persistency of our data in the world of iOS.

Core Data for instance is a great solution offered by Apple that provides an incredible good performance even when dealing with a really huge amount of data. But there are also, some other alternatives poping around. One of these alternatives is Realm which is said to offer even better performance than Core Data, with a simpler syntax.


But sadly, not eveything is as wonderful as expected in this world of persistency. There are also plenty of problems. I have had really bad experiences with Core Data, Realm or many of these other trendy persistence frameworks out there, of course not only because of the frameworks itself, but because of how they are applied to the projects.

The main problem is that, due to the complexity of the problem that these frameworks solve, they tend to have a quite complex syntax. And if the scope of the framework is not clearly defined, their objects in the end tend to be scattered all around the project, finding UIViews taking data from NSManagedObjects, UICollectionViews populating cells using RLMObjects, etc… 

以上是关于text Swift存储库模式的主要内容,如果未能解决你的问题,请参考以下文章

Github swift 存储库标记为 Objective-c

Xcode Swift 包管理器错误 - 找不到存储库

text 将本地存储库推送到现有存储库

Swift中结构体的方法调度&内存分区

仅在 Swift 中以横向模式打开相机和库

在iOS Swift中不使用AWS SDK在Amazon S3存储桶中上传的背景图像(背景模式)