Designing for offline-first
Today’s users are on the move, and they increasingly rely on mobile devices. You may be reading this on a mobile device. If so, you likely downloaded the content to your device, so you could read it when you are offline. For static content, this is straightforward, and you knew upfront that you wanted offline access.
For applications with dynamic content, the process of making the content available offline is more involved. Plus, it is more difficult to predict when connectivity will be unavailable. It is helpful to think of this problem in terms of the CAP theorem, which shows us that in the case of a system partition, we have to choose between consistency and availability. We cannot have both.
Loss of connectivity is a perfect example of a system partition because the application can no longer retrieve and update the dynamic content. In this case, users favor availability over consistency. They want the application to continue working and...