When connection basiafusinska.com barbarafusinska.com Going offline on mobile
About basiafusinska.com barbarafusinska.com
Agenda Why & when What How – Data sync patterns – Full offline experience – Local data sync – Conflicts
WHY DO WE EVEN NEED OFFLINE?
UX PATTERNS FOR OFFLINE APPS
DON’T LOSE LOCAL DATA…
DON’T TREAT OFFLINE LIKE AN ERROR…
DON’T SCARE THE USER…
COMMUNICATE…
DON’T LIE…
Atwood’s Law Any application that can be written in JavaScript, will eventually be written in JavaScript
HOW TO BUILD FULL OFFLINE EXPERIENCE?
Cache Retrieving data from a new source Local copy
Local database How much data do you need?
OFFLINE IS NOT A PROBLEM
OFFLINE PATTERNS cache, deferred updating, local database sync
BACKGROUND CACHING
PROBLEMS
DEFERRED UPDATING
CACHED UPDATES
PROBLEMS
PROS & CONSS
LOCAL DATABASE SYNC
FULL OFFLINE EXPERIENCE
VERSIONING & MIGRATION
PROBLEMS
DATA SYNC
Syncing technologies
INCREMENTAL SYNC
GET /endpoint/{timestamp}
POST /enpoint {data}
HOW TO GATHER INCREMENTAL DATA?
SERVER SIDE
LOCAL SIDE
Sequential changes Created & updated Created & deleted Updated & deleted
RELATIONS
RESOLVING RELATIONS
CONFLICTS
Sync new/created data No conflicts … unless relations
DELETE
UPDATES
Summary Full offline experience Data sync Conflict resolution
barbarafusinska.com basiafusinska.com