State & Data

Offline-first storage

Offline-first means the application remains useful when the network is unavailable. Store the minimum durable state locally and synchronize only when a server exists.

DataGood fitReason
User settingsSharedPreferencesSmall key/value data
Structured recordsSQLite/DriftQueries and relationships
Export/importJSON/CSVPortable backups
Large binary filesFile system / object storageAvoid putting blobs in preferences
Backup rule

Export formats should be versioned. A future app version must know how to interpret older backups.

Lesson complete?Use the next lesson to continue the learning path.