Annyce Davis

ones and zeros

  • Home
  • Public Speaking
  • About Me
  • Courses
  • Life

Realm Migrations Supercharged with Dagger

March 8, 2017 by Annyce Davis 2 Comments

My current tech obsessions are: Realm, Dagger and Unit Testing. Therefore, I’m always looking for opportunities to improve my code in some way that involves one or more of the above. That being said, I realized that the recommended way of handling migrations in Realm could be improved significantly by means of Dagger 2.

We’re going to be refactoring the following Migration class:


With only two version updates, we already have a decent sized method to deal with. What’s more if you didn’t start out by creating tests for your migrations, once this method gets much longer you probably never will. But all is not lost, Dagger’s Multibinding Support is coming to the rescue. Let’s take a look!Continue Reading

Follow Me

Talk: The Real MVP

You have an idea for a new app. You've secured buy-in from the business. What's next? The MVP. But what does it take to ship a new app these days? What are the … [Read More...]

Improved caching with Kotlin flows and the reduce function

I've been on a caching crusade. I'm working to reduce the load on our database by focusing on various caching solutions. In an ideal world, data that is … [Read More...]

Categories

  • Android (54)
  • Career (2)
  • Communication (4)
  • Flutter (1)
  • Git (4)
  • Gradle (4)
  • Grails (23)
  • Java (8)
  • JavaScript (6)
  • Kotlin (16)
  • Life (4)
  • Public Speaking (23)
  • RxJava (1)
  • Software Development (7)
  • Twitter (3)
  • Uncategorized (11)
  • Video Course (4)

Copyright © 2022 · Beautiful Pro Theme on Genesis Framework · WordPress · Log in

 

Loading Comments...