Key Components of Room & Manually Creating A Database Instance(#OF03)

👋 Intro On the previous article we have set-up the Room dependencies and plugins, Now lets get into the primary key components of a room library. There are three important components: Entity, DAO’s, and Database. Entity represents a single row of a table. (Table structure) DAO’s (Data Access Objects) are interfaces to write queries and define operations. Database is where you associate entities and include the DAO’s you’d like to access from outside. Let’s check it out one by one! 🔍 ...

February 22, 2025 · 5 min

Setting-up Room Library and its dependencies(#OF02)

Before we proceed with the setup, let’s quickly recap why we chose Room: ✅ Compile-time SQL Validation – Catches errors early by verifying SQL queries at compile time. ✅ Kotlin-first Approach – Supports coroutines, Flow, and LiveData natively. ✅ Less Boilerplate Code – Simplifies database interactions while maintaining SQLite’s power. ✅ Seamless Migration Handling – Built-in support for database migrations. For a more detailed explanation, refer to the official Android documentation. ...

February 10, 2025 · 3 min

Upgrading Your App to Offline First With Room (#OF01)

Why Should You Care? Making your app offline-first is essential if you want to provide the best user experience. It makes your app significantly faster by reducing the number of network calls, which in turn also reduces server costs. What does Offline-First mean? The core idea is to persist/store remote-fetched data on the device. This allows users to access the data instantly, skipping unnecessary network requests—until the data expires or is invalidated. ...

February 9, 2025 · 5 min