Closed yccheok closed 5 years ago
Hi @yccheok,
You have two questions.
Is it suitable for production usage at current stage?
GRDB is, definitely. Four years of production-graded applications already.
GRDBCombine is new, it targets beta iOS and beta Xcode, so the strict answer is: NO. Yet it is tested, inspired from the battle-tested RxGRDB, and really supposed to work well: you can rely on it. Please open a new issue if you witness anything unexpected. But please remember GRDBCombine is at version 0.4.0: this means, in semantic versioning, that the API is not stable.
May I know, is GRDBCombine having similar idea/ philosophy as Android Room's LiveData?
You definitively hit a sweet spot.
In the company I work for, I have coworkers who work on Android with the Room library. I'm not expert with Room, but I see a lot of similarities with GRDB. I am able to share a common vocabulary with my dear coworkers, even if we don't actually share code.
Yes: GRDB, GRDBCombine, and Room share a common idea / philosophy, even if I am not able yet to describe it precisely.
In particular, GRDBCombine publishers are very close to both RxJava Flowables and to LiveData objects. There are subtle differences, but experience is better at spotting them than my words.
I wish I could describe more the similarities between Room and GRDB. My advice to you is to understand the GRDB Concurrency Guide, Good Practices for Designing Record Types, and the Room @Transaction annotation. The goal is the same: have you control your access to the database, and make sure you can preserve the integrity of your database.
Welcome to GRDB: you have made a good choice!
Welcome to GRDBCombine: you are an early user of a very new library: you may face issues. But GRDB and its satellite projects are usually quite reliable.
One difference between Room and GRDB is that Room doesn't want you to access database from the main thread (by default), when GRDB doesn't care at all: you can access your database synchronously, or asynchronously, from any thread, at your convenience.
This sometimes makes GRDB/GRDBCombine code simpler than Room code. GRDB makes it possible to have database values available immediately. On the contrary, Room forces you to make your screens/activities/fragments able to wait for data. This is not a major difference. But don't hesitate making your iOS apps simpler than your Android apps, especially when fetching the needed values is fast enough.
I'm closing this issue. Feel free to open a new one if necessary.
Hey,
Thank you, and Congratulation for creating GRDB.swift.
When I compare against GRDB.swift, SQLite.swift and FMDB, we decide to go for GRDB.swift. I like how it works, and it seems closest to ORM taste.
I'm from Android background, our previous project relies heavily on Room's LiveData
May I know, is GRDBCombine having similar idea/ philosophy as Android Room's LiveData? Is it suitable for production usage at current stage?
Thank you.