Session Details
Session
Level: #Intermediate
Category: Android | Format: Lightning talk
3:10 pm - 3:30 pm | Oreo
Generic daos in room database for less boilerplate code
Session Description:
Every android application that handles data will need to store that data at some point. Android's room database is usually a good choice for all your local data storage needs. It allows engineers to focus on what's important, building features, and not get bogged down with db related tasks. There are times when, as an engineer, you've got multiple related tables. It can be difficult and time consuming to maintain all of these tables. In my case, I had 4 tables that stored different types of notes. The notes were quite similar with some minor differences; with generic daos I created a base entity and dao and then had all the other note entities and daos inherit from the base. I want to show android engineers how they can utilize generic daos and entities in their projects. Once we're done they'll be able to create base daos & entites and know when to use them in a project. They'll also have learned of some of the benefits of using base daos & entities.