Introducing DaoCompat: greenDAO on ObjectBox

Earlier this month, we released ObjectBox 1.0, a new superfast object-oriented database. Now, with DaoCompat, you can easily use the power of ObjectBox in your Android apps while keeping the greenDAO APIs.

Boost your App performance

DaoCompat lets your greenDAO-based apps run on ObjectBox giving your your apps an instant performance boost.

Going forward you can also use ObjectBox’ modernized APIs. It works with Kotlin and reactive queries (with or without RxJava 2). Also, object relationships are much more powerful with change tracking and intelligent updates.

For greenDAO users it is an easy switch: With DaoCompat you can continue to use familiar classes from greenDAO like DaoSession and individual DAOs. Just use the package org.greenrobot.daocompat instead of org.greenrobot.greendao. Initialization to get the DaoSession is also trivial:

Technically, DaoCompat is a thin layer on top of ObjectBox. It’s open source under the Apache 2 license.

Check the DaoCompat docs for details and let us know what you think.

The Future of greenDAO

Since greenDAO was released in 2011, it has been the performance leader in Android ORM and performance was always the primary driver behind greenDAO. Performance-wise, we hit a wall with SQLite because SQLite became the only remaining bottleneck. This is the very reason why we developed ObjectBox because we believe that the future of apps will not include SQLite. Still, we will continue to maintain greenDAO. At the same time we will put much more effort into ObjectBox and exciting new features around it. In that way, look at DaoCompat as a convenient tool to upgrade your database.

Spread the love
Posted in Release and tagged , , .

2 Comments

  1. Been using GreenDao for a long time and absolutely love it – especially the fact that we can fallback to SQL when needed – and it is needed!

    So I really don’t see an easy migration to ObjectBox with all the SQL that we have.

    • Hi Morten, thanks for your feedback! You are totally right – i depends on the app and how much SQL is involved.

      We also would like to learn more about actual use cases in which you fall back to SQL. We’d be very happy if you could share some. Thank you!

Comments are closed.