Why I did not choose Realm.io for my android app

Recently I published an android app TimeUspent in google play store.

While working on the development of this app I came to know about Realm.io (Android), which I thought really cool and wanted to try it out.

As my android app has very simple data model, I thought it was good idea to play with this new tool for persistence of data in the app.

Realm.io is very appealing for a variety of reasons the most prominent among them are:

1. No need to deal with SQL. Developer can happily live in their object world no need to deal with SQL specifically SQLlite.

2. Speed: Realm.io really shines here in terms of speed over sqllite which mostly used with ORMs and not as fast as realm.io

As mentioned, I was not expecting any surprises for my simple requirement but soon I was dragged into those.

ONLY Getters and Setters are allowed methods in model classes.

You will get compilation errors for using ANY other methods in the model class. Think about this for a moment ...

Yeah.. you can not have toString(), Static methods, not even other behaviour methods in your model classes.

Getters and Setters implementations are replaced by realm proxy, so no validation/format checker code executed in setters.

Realm.io does not allow any other methods than getters/setters in model classes and it proxies implementation of getters and setters of model objects.

What it means is if you have overridden your getters and setters for encapsulation purpose it does not get executed.

Check demo app for code details.

Migration is the worst documented feature and highly unreliable.

Documentation is very confusing and even after understanding it,migration did not worked reliably for me.

I had enough pain so far so even though it was very fast and promising persistence library I had to rewrite my persistence code with old trusted friend SQLlite.

I have a demo app showing above two problems in github.