Callum Hart is a London based Front-end Software Engineer. At Nutmeg he builds products for customers investing their savings in the s

How To Build Resilient JavaScript UIs

submited by
Style Pass
2021-08-04 12:30:15

Callum Hart is a London based Front-end Software Engineer. At Nutmeg he builds products for customers investing their savings in the stock market. At KAYAK he … More about Callum ↬

Things on the web can break — the odds are stacked against us. Lots can go wrong: a network request fails, a third-party library breaks, a JavaScript feature is unsupported (assuming JavaScript is even available), a CDN goes down, a user behaves unexpectedly (they double-click a submit button), the list goes on.

Fortunately, we as engineers can avoid, or at least mitigate the impact of breakages in the web apps we build. This however requires a conscious effort and mindset shift towards thinking about unhappy scenarios just as much as happy ones.

The User Experience (UX) doesn’t need to be all or nothing — just what is usable. This premise, known as graceful degradation allows a system to continue working when parts of it are dysfunctional — much like an electric bike becomes a regular bike when its battery dies. If something fails only the functionality dependent on that should be impacted.

Leave a Comment