Green DAO vs ORM lite vs Active Android

AndroidOrmliteGreendaoActiveandroidDroidparts

Android Problem Overview


Which is the best ORM tool available for Android?

I am seeing ORMlite and ActiveAndroid are the most discussed across and a friend of mine suggested me to use GreenDAO. So looking for some knowledge resource which can help me in Decision Making?

Features I am looking to judge are freely available (open source), good documentation, active forums, stable version available, etc, which ever required for developer.

Android Solutions


Solution 1 - Android

I would suggest ORMlite its open source freeware & has good documentation also it support java as well as android.

It has good developer support & many application running on ORMlite (Including I have developed :) ).

check this comparison of ORMLite & Green DAO for your referance.

Solution 2 - Android

A difference between ORMLite and GreenDAO is the usage of annotations. While ORMLite uses Annotations, GreenDAO does not, as described here.

Annotations used by ORMLite rely on reflection, which might impact performance especially on slower Android devices in a negative way. Would be interesting to see benchmarks comparing ORMLite and GreenDAO.

Solution 3 - Android

One issue I have with a number of the libraries that I've used is that they require that their initialization take place in android.app.Application.onCreate(). I prefer that libraries allow me to do their initialization in a secondary thread, in a service, or after I have finished displaying the user interface.

I believe that Active Android has this 'problem', and ORMLite does not. I'm not sure about GreenDAO.

Whether it is really a problem depends on your application, but I will note that the docs for onCreate() say "Implementations should be as quick as possible (for example using lazy initialization of state) since the time spent in this function directly impacts the performance of starting the first activity, service, or receiver in a process."

Unrelated to that, I note that ActiveAndroid uses annotations, like ORMlite, but unlike GreenDAO which uses code generation.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionRavi GView Question on Stackoverflow
Solution 1 - AndroidR WorldView Answer on Stackoverflow
Solution 2 - AndroidPhilippView Answer on Stackoverflow
Solution 3 - AndroidTomView Answer on Stackoverflow