什么是android的coredata等价物

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11046258/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 05:50:38  来源:igfitidea点击:

What is coredata equivalent for android

androidcore-data

提问by user4951

I used to program for iPhone.

我曾经为 iPhone 编程。

But then I want to make another similar program in Android.

但是后来我想在Android中制作另一个类似的程序。

Well, should I use a coredata like framework?

好吧,我应该使用像框架这样的核心数据吗?

Does android have something similar?

安卓有类似的吗?

采纳答案by Serdar Dogruyol

Actually what you need is to check ORM tools for Android for persistence.And decide on which one suits you best.

实际上你需要的是检查Android的ORM工具是否具有持久性。并决定哪一个最适合你。

Here are your top choices:

以下是您的最佳选择:

OrmLite : http://ormlite.com/sqlite_java_android_orm.shtml

OrmLite : http://ormlite.com/sqlite_java_android_orm.shtml

GreenDao : http://greendao-orm.com/

绿道:http://greendao-orm.com/

回答by Dia Kharrat

I recently released an open source version of Core Data for Android, called NexusData. You can find it here: https://github.com/dkharrat/NexusData

我最近发布了 Android 版 Core Data 的开源版本,称为 NexusData。你可以在这里找到它:https: //github.com/dkharrat/NexusData

It's still early in development, but hopefully will mature over time.

它仍处于开发初期,但希望随着时间的推移会成熟。

回答by ChaturaM

Try Android Realm. It looks straight forward and easy to use

试试安卓领域。它看起来直截了当且易于使用

https://github.com/realm/realm-java

https://github.com/realm/realm-java

回答by DevAndroid

RoomData Storage is a new way to store application data in Android. It is provided by google and is a part of the Android Architecture components. Roomis offered as a high-level, first-party alternative to Realm, ORMLite, GreenDaoand many others.

Room数据存储是一种在 Android 中存储应用程序数据的新方式。它由 google 提供,是 Android 架构组件的一部分。Room是提供一个高层次,第一方的替代RealmORMLiteGreenDao和其他许多人。

回答by Vincent Cotro

Actually, I think that you have two solutions to save data without using directly SQLite.

实际上,我认为您有两种解决方案可以在不直接使用 SQLite 的情况下保存数据。

You can use shared preference to save a value to a key. It permits to save information quickly, but it's quite limited. Also, I have heard about greenDAO(read the "get started"), unfortunately it will be harder to use than Core Databecause you will not find any user interface.

您可以使用共享首选项将值保存到键。它允许快速保存信息,但它非常有限。另外,我听说过greenDAO(阅读“入门”),不幸的是它比Core Data更难使用,因为你找不到任何用户界面。