liveBook · Manning

Local-first approach

As explained in The Art of Code

A software design pattern that prioritizes local operation and synchronizes locally recorded data with remote services when possible.

A local-first approach keeps most operations on the device, records user actions locally, and synchronizes changes with remote services in the background when possible. section 8.4.4

Use the pattern to reduce interaction costs while preserving access to remote data:

  • Cache recently used data locally instead of requesting the server for every small interaction. section 8.4.4
  • Record actions locally, then batch multiple updates into a later synchronization request. section 8.4.4
  • Choose polling or push updates according to change frequency and connection-resource costs. section 8.4.4

How The Art of Code covers it

How deep it goes
Explains local storage, background synchronization, batching, caching layers, and polling-versus-push tradeoffs.
Examples
Uses locally recorded actions, batched updates, cached data, dashboard polling, and push-based update mechanisms as examples.
What you can do after
Evaluate and apply local operation, caching, batching, and update mechanisms according to interaction and data-change patterns.
How it connects
Connects local operation with caching, synchronization, polling, WebSockets, Server-Sent Events, and HTTP caching.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of The Art of Code. The section links point to the parts of the book it draws on.