跪拜 Guibai
← All articles
Frontend · JavaScript · Programmer

The Frontend Engineer's Playbook for Saying No Without Saying No

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

Frontend engineers who can't articulate technical boundaries end up owning impossible deadlines and production failures. This pattern — state the limit, price the alternatives, return the decision — turns a confrontation into a collaboration and protects both the system and the engineer's reputation.

Summary

Senior frontend engineers don't refuse unreasonable demands; they reframe them as trade-offs. When a product manager asks for 100,000 DOM nodes in an infinite scroll, a sub-second load time on a slow backend, or client-side encryption of PII, the response isn't a flat no. It's a breakdown of the browser's physical limits, the full network chain, or the transparency of frontend code, followed by a concrete alternative with a clear cost. The technique works across four common scenarios: massive DOM rendering, performance targets, mobile drag-and-drop, and local encryption. In each case, the engineer names the technical ceiling, proposes a cheaper path, and asks the product manager to choose. The underlying move is risk assessment and cost accounting delivered in the product manager's own language — business impact. The final step is handing the decision back, so the product manager owns the safer choice rather than feeling overruled.

Takeaways
Browsers crash when DOM node counts exceed roughly 5,000 on low-end Android devices; 100,000 rich-text items can generate 300,000 nodes.
Virtual scrolling keeps the visible DOM to 20–30 items, cutting memory from gigabytes to tens of megabytes at the cost of about two extra development days.
A 1-second page-load target spans DNS, TCP, TLS, backend response, CDN, and frontend rendering; the frontend controls only the final segment.
Frontend encryption is security theater — keys and algorithms are visible in DevTools, so real encryption must happen server-side or via a backend-issued public key.
Mobile drag-and-drop conflicts with native scroll behavior and demands weeks of state management and animation work; a long-press menu can deliver the same outcome in days.
Never say "this can't be done"; say "it can be done, but the cost is X, and here are alternatives A, B, and C."
After laying out the options, ask the product manager to decide — it preserves their authority and your relationship.
Conclusions

The core skill isn't technical depth alone; it's translating that depth into business-risk language that a non-engineer can act on.

Framing a refusal as a set of priced alternatives shifts the conversation from a personal standoff to a shared business decision.

The advice to let the product manager make the final call is a power move disguised as deference — it makes the safer technical path feel like their own idea.

Concepts & terms
Virtual Scroll
A rendering technique that keeps only the DOM nodes visible in the viewport mounted, recycling them as the user scrolls, so a list of any length uses a constant, small number of nodes.
DOM node limit
Browsers have a practical ceiling on simultaneously mounted DOM nodes; exceeding roughly 5,000 nodes on low-end mobile devices causes frame rates to drop sharply, leading to visible lag or crashes.
Frontend encryption
Encrypting data in the browser is ineffective for secrecy because all JavaScript source, keys, and algorithms are visible to the user via DevTools; real confidentiality requires server-side or asymmetric encryption where the private key never leaves the server.
From the discussion

The discussion splits on whether the article actually delivers on its title. One view dismisses the premise outright: if a model underperforms, just swap it — the three-day timeline is trivial. Another challenges the framing, arguing the described approach is elegant implementation, not elegant rejection. The replies are pure reaction, adding no further substance.

The article's premise is undercut if the real solution is simply switching models within a short timeline.
The described technique constitutes graceful implementation of a requirement, not graceful rejection of it.
Featured comments
用户1237379209378

If it doesn't work, just switch models, and it's only three days~~~

ErpanOmer

[facepalm][facepalm][facepalm]

天涯没有海角

This isn't rejecting the requirement at all — you're implementing it elegantly, not rejecting it elegantly~

ErpanOmer

[grin][grin][grin]

See top comments, translated →
Source: juejin.cn ↗ Google Translate ↗ Backup ↗