V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
iOS 开发实用技术导航
NSHipster 中文版
http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
http://www.cocos2d-iphone.org/
CocoaPods
http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
http://code.google.com/mobile/analytics/
WWDC
https://developer.apple.com/wwdc/
Design Guides and Resources
https://developer.apple.com/design/
Transcripts of WWDC sessions
http://asciiwwdc.com
Cocoa with Love
http://cocoawithlove.com/
Cocoa Dev Central
http://cocoadevcentral.com/
NSHipster
http://nshipster.com/
Style Guides
Google Objective-C Style Guide
NYTimes Objective-C Style Guide
Useful Tools and Services
Charles Web Debugging Proxy
Smore
54miracle
V2EX  ›  iDev

吐槽一下 Realm

  •  
  •   54miracle ·
    miracle · 2015-04-17 09:40:42 +08:00 · 4091 次点击
    这是一个创建于 3287 天前的主题,其中的信息可能已经有所发展或是发生改变。
    之前调研过Realm,看是Ycombinator创业营出品,产品迭代也挺快,感觉应该挺靠谱。 就在新项目中准备用一下,试用了几天还是发现有好多坑。

    像Realm这样有数据库格式,到应用层API的第三方库,即使更新迭代快,增加一个数据层格式的支持也是需要很长的周期。 选择得慎重

    还有在使用的V友么,一起讨论下。

    官网: http://realm.io/
    第 1 条附言  ·  2015-04-17 17:50:43 +08:00
    Realm设计的初衷是为了实现一个更适合移动终端的database系统,比如在oc上,相比SQLite,API的封装更友好更方便,相比CoreData,性能会更好。

    但是这样的库要做到比较成熟,可能得等到2.0版本,现在还没有发1.0版。

    刚用了两天,就遇到了暂时不支持model字段对应值为null、没法设置primary key为auto increment的问题。再考虑要不要换成SQLite。
    7 条回复    2015-10-09 15:21:27 +08:00
    arbipher
        1
    arbipher  
       2015-04-17 09:59:05 +08:00
    有那些坑啊楼主分享一下?
    PrideChung
        2
    PrideChung  
       2015-04-17 10:12:09 +08:00
    刚出的时候我也是打了鸡血一样了,一直在等类似NSFetchedResultsController的功能,后来等到没爱了就没关注了。
    yichen
        3
    yichen  
       2015-04-17 11:05:10 +08:00
    从去年7月份发布就开始关注了,优点是速度快,API的设计简洁。不方便的是migrate需要手写,长期维护下来是问题。
    allan1st
        4
    allan1st  
       2015-04-18 01:17:23 +08:00
    我用的 JAVA 版,又一些一样的问题:
    不能为 null (自己写 getter 可以解决);migrate 不友好;还有不支持 JSON 格式中的 String/Integer Array 。
    最关键一点是只能在同一线程 query 和使用(虽然速度很快,但是我怕数据库大了还是要卡界面)。
    beeender
        5
    beeender  
       2015-10-09 10:23:53 +08:00
    @allan1st Realm 刚刚发布了对 null 的支持,见 https://realm.io/news/realm-java-0.83.0/ 异步 query 的支持也将很快发布,可以关注这个 PR https://github.com/realm/realm-java/pull/1214
    allan1st
        6
    allan1st  
       2015-10-09 15:08:19 +08:00
    @beeender 非常感谢!
    allan1st
        7
    allan1st  
       2015-10-09 15:21:27 +08:00
    @beeender 最近尝试找一些替代,发现 Storio 也不错。支持 RxJava 。 https://github.com/pushtorefresh/storio
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5371 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 09:29 · PVG 17:29 · LAX 02:29 · JFK 05:29
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.