Menu

Optimistic UI vs Server-Driven UI: Who Decides What the Screen Shows
πŸ“°

Optimistic UI vs Server-Driven UI: Who Decides What the Screen Shows

DEV Community: frontendΒ·gxqwbΒ·8 days ago
#fBNakK73
#devtofrontend#devto#dev#server#client
Long article (1244 words) β€” no AI summary yet.
Reading 0:00
15s threshold

Users judge interfaces by how fast they respond, but product teams judge them by how fast they can change. These are different problems, and two popular patterns address them with almost opposite moves. One hands control to the client, which paints the likely outcome before the server agrees. The other hands control to the server, which sends a description of the screen along with the data. Both reduce waiting, but one hides latency while the other removes a release cycle.

Optimistic UI is a latency trick in which the client renders the expected result immediately and repairs itself if the server disagrees, while server-driven UI is a control trick in which the server supplies the layout so the interface can change without shipping a new client.

Part One: What each pattern actually does

With optimistic updates, a click is processed locally first. A "like" button flips its state, a message appears in the thread with a pending indicator, or a row disappears from a list. Only then is the request sent.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.