Live data from Hacker News

Show HN: Realm for Android

realm.io

41–50 of 66 posts

Re: Show HN: Realm for Android

#41
I'm using Realm on iOS at the moment for a reasonably large application. I originally had a C cross-platform core based on SQLite, but I found it too difficult to maintain and threw most of it out after attempting to make what should've been a minor change that ended up going on for two weeks.

Realm reduced the core size by approximately 90%, and while I've given up the cross-platform part (target platforms were iOS, OS X and Windows; obviously not focussed on Windows at this point), the code clarity and ease with which I can change data structures makes this approach so much better.

Are you guys looking at supporting Windows/C#/.NET at this stage, because while I don't develop much software for it, it does come up occasionally, and it would be good to use it throughout.

Re: Show HN: Realm for Android

#42
post #41

I'm using Realm on iOS at the moment for a reasonably large application. I originally had a C cross-platform core based on SQLite, but I found it too difficult to maintain and threw most of it out after attempting to make what should've been a minor change that ended up going on for two weeks. Realm reduced the core size by approximately 90%, and while I've given up the cross-platform part (target platforms were iOS,…

Absolutely. We’re good friends with Unity, know lots of people at Microsoft and have a ton of respect for what Xamarin is doing, so we’d love to support the whole .Net ecosystem soon. We’re a small team with limited resources so we have to prioritize this vs. sync vs. core work vs. improving iOS & Android but we’ll try to all of these things as quickly as possible. Thanks for being a user and thanks for the kind words :)

Re: Show HN: Realm for Android

#43
post #9

The "a replacement for SQLite & Core Data" description confuses me. Is this a SQLite replacement, in that it is its own database, or a CoreData replacement, in that it's "just" a nice API over some other persistence layer (afaik, CoreData gives you a nice consistent API over a number of concrete persistence implementations, with SQLite being one such implementation)

Hi, I wrote that tagline so maybe I can explain the rationale. We initially called ourselves “a database that runs directly inside phones, tablets & wearables” but received some ridicule for that as it sounded like we didn’t expect our readers/users to know what a mobile/embedded database was. We iterated a few times until we found this description, where we explain that we replace both low-level DBs like SQLite and…

So you actually _do_ provide your own db then?

I'd love to know a bit more about this. What drove the decision to roll your own? Seeing as how SQLite is pretty mature and widely deployed, my first instinct if I wanted to tackle this problem would just have been to write the best damn ORM I could on top of SQLite.

Re: Show HN: Realm for Android

#44
post #43

Earlier quoted context omitted.

Hi, I wrote that tagline so maybe I can explain the rationale. We initially called ourselves “a database that runs directly inside phones, tablets & wearables” but received some ridicule for that as it sounded like we didn’t expect our readers/users to know what a mobile/embedded database was. We iterated a few times until we found this description, where we explain that we replace both low-level DBs like SQLite and…

So you actually _do_ provide your own db then? I'd love to know a bit more about this. What drove the decision to roll your own? Seeing as how SQLite is pretty mature and widely deployed, my first instinct if I wanted to tackle this problem would just have been to write the best damn ORM I could on top of SQLite.

[deleted]

Re: Show HN: Realm for Android

#45
post #41

I'm using Realm on iOS at the moment for a reasonably large application. I originally had a C cross-platform core based on SQLite, but I found it too difficult to maintain and threw most of it out after attempting to make what should've been a minor change that ended up going on for two weeks. Realm reduced the core size by approximately 90%, and while I've given up the cross-platform part (target platforms were iOS,…

Absolutely. We’re good friends with Unity, know lots of people at Microsoft and have a ton of respect for what Xamarin is doing, so we’d love to support the whole .Net ecosystem soon. We’re a small team with limited resources so we have to prioritize this vs. sync vs. core work vs. improving iOS & Android but we’ll try to all of these things as quickly as possible. Thanks for being a user and thanks for the kind word…

I'm in no hurry, and I'm sure most people would agree that they'd rather see a database improve stability than branch out too fast to new platforms. Keep up the good work!

Re: Show HN: Realm for Android

#46
I've always wondered how folks handle the Parcelable[1] interface with libraries like this. If you have a realm object that you want to have in memory between activity destroy/create how do you handle this? For instance if I rotate the screen the activity is destroyed and recreated for the new orientation. As I understand it the Parcelable interface and Bundle[2] is the way to handle this but how can you do this if you're using third party classes/objects?

Thanks!

[1]: http://developer.android.com/reference/android/os/Parcelable... [2]: http://developer.android.com/training/basics/activity-lifecy...

Re: Show HN: Realm for Android

#47
post #23

Earlier quoted context omitted.

Thanks for the heads-up! We’ll get that fixed shortly. We do support JSON (and GSON) — you can see it at work in our gridViewExample ( https://github.com/realm/realm-java/tree/master/examples/gri... )

Eek so I actually have to make/use a setter for every single attribute of my models? That's definitely a deal breaker for me.

try using http://projectlombok.org/

Re: Show HN: Realm for Android

#48
post #46

I've always wondered how folks handle the Parcelable[1] interface with libraries like this. If you have a realm object that you want to have in memory between activity destroy/create how do you handle this? For instance if I rotate the screen the activity is destroyed and recreated for the new orientation. As I understand it the Parcelable interface and Bundle[2] is the way to handle this but how can you do this if y…

The main difference is that with Parcelable you have two versions of your object (one persisted on disk and one in memory) while with Realm you are always working with your real data, not a representation of it.

Re: Show HN: Realm for Android

#49
post #46

I've always wondered how folks handle the Parcelable[1] interface with libraries like this. If you have a realm object that you want to have in memory between activity destroy/create how do you handle this? For instance if I rotate the screen the activity is destroyed and recreated for the new orientation. As I understand it the Parcelable interface and Bundle[2] is the way to handle this but how can you do this if y…

I use Parceler (https://github.com/johncarl81/parceler) with gson. So gson for network data, then parceler for passing parcels around between activities/fragments.

Re: Show HN: Realm for Android

#50
Is realm planning to make a c++ interface version, seeing how it's made in C++? A lot of cross platform cores use C++ since it Works Everywhere(tm) as an FFI to other languages & platforms.
Post reply on HN