跪拜 Guibai
← All articles
Frontend · JavaScript · Developers

Frontend Isn't Easier Than Backend — It's Hard in a Completely Different Way

By ErpanOmer ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Dismissing frontend as 'just drawing pages' misses that production client-side engineering is a discipline of environmental resilience. Teams that treat it as a junior task end up with white screens, corrupted state, and financial display bugs that no backend log will ever catch.

Summary

Backend complexity lives in a controlled world of Linux containers, where scaling bottlenecks have standard answers: more machines, caching layers, and database sharding. Frontend code, by contrast, gets dumped as obfuscated JavaScript into an uncontrollable zoo of devices, browsers, and network conditions. A request race condition that looks trivial on paper can corrupt a financial dashboard when a weak mobile network delivers responses out of order. Chrome extensions silently intercept API calls or rewrite DOM nodes, crashing React's virtual DOM diffing and white-screening the page. Some Android WebViews even monkey-patch native JavaScript APIs, breaking standard functions that run fine everywhere else. The real frontend job isn't painting UIs — it's building a reliable system on top of an inherently unreliable runtime, where 80% of the effort goes into compatibility and defensive engineering rather than business logic.

Takeaways
Backend environments are closed and stable; frontend environments span unknown devices, browsers, extensions, and network conditions.
Request race conditions from slow or out-of-order responses can corrupt UI state and cause financial display errors.
Chrome extensions and translation plugins can intercept network requests or mutate the DOM, breaking framework internals like React's virtual DOM diffing.
Some Android WebViews overwrite native JavaScript APIs, causing standard functions to throw errors in production.
Frontend engineering is dominated by compatibility and defensive code, not just business logic.
Modern frameworks and the V8 engine absorb enormous complexity, creating the illusion that frontend work is simple.
Conclusions

The 'frontend is easy' perception persists because frameworks and engines have already solved the hardest problems invisibly — the rendering pipeline, task scheduling, and reflow optimization.

Backend and frontend difficulty are incommensurable: one is about scaling data consistency under load, the other is about maintaining correctness across a hostile, unpredictable runtime surface.

Judging a discipline's difficulty by its entry-level tooling is a category error; scaffolding a dashboard in two minutes says nothing about running a million-user interactive system.

Concepts & terms
Request Race Condition
When multiple asynchronous requests are fired and their responses arrive in an unpredictable order, causing the UI to display data from a request that no longer matches the user's current state — for example, showing Tab A's data when the user has already switched to Tab B.
WebView
A system component on mobile platforms that renders web content inside a native app. Some Android WebViews are known to modify or break standard JavaScript APIs, creating a runtime environment that differs from normal browsers.
Virtual DOM Diffing
React's mechanism for efficiently updating the UI by comparing a virtual representation of the DOM with the previous one. If external code mutates the real DOM directly (e.g., a browser extension), the diffing algorithm can fail and crash the page.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗