跪拜 Guibai
← All articles
Frontend

Frontend Architecture Isn't About Code Sorting; It's About Lifecycle, Boundaries, and Organizational Reality

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

Architecture advice that ignores organizational pressure and project lifecycle rarely survives contact with real enterprise or government projects. This perspective offers a practical counterweight to the common focus on purely technical patterns, especially as AI makes writing code faster while leaving architectural judgement as the bottleneck.

Summary

This closing essay from a multi-part column on frontend engineering architecture argues that the real purpose of architecture is not initial tidiness but the ability to survive years of changing business requirements, team turnover, and third-party dependency upgrades. The author draws on experience with enterprise SaaS, ERP, and government/enterprise projects, where long delivery cycles and client-specific demands constantly test the limits of early design decisions.

The piece emphasizes that architecture decisions must account for business, deployment environment, team size, and project lifecycle, not just technical implementation. It also gives weight to organizational factors: R&D teams often lack full decision-making power, and unreasonable client requirements must be accepted. The recommended response is isolation: keep special logic out of shared modules, use adapter layers for non-standard flows, and document compromises so the core architecture stays intact.

The author also addresses AI coding tools, noting they speed up implementation but do not resolve legacy coupling, deployment constraints, or architectural judgment. As code becomes cheaper to produce, the ability to understand context, weigh trade-offs, and own the final design becomes more valuable. The essay closes with a call for pragmatic, context-aware architecture rather than chasing a perfect universal standard.

Takeaways
— Frontend architecture should be designed for a project's long-term lifecycle, including years of added features, component changes, and developer turnover.
— Early projects that skip architectural planning often accumulate code coupling, messy shared components, and tangled dependencies that later become costly to untangle.
— Architecture decisions must consider business needs, deployment environment (especially intranet, security policies), team size, tech ecosystem, and project lifecycle, not just code organization.
— In government/enterprise and customization-heavy projects, R&D teams often lack full decision power, and some unreasonable client requirements are unavoidable.
— When impossible requirements must be accepted, isolate them: keep special customer logic out of shared modules, use configuration or extension modules, and maintain adapter layers for non-standard flows.
— Document the scope, affected modules, and future maintenance responsibility for any architectural compromise.
— AI coding tools speed up implementation but do not solve legacy business coupling, historical logic, special deployment environments, or long-term technical constraints.
— As AI lowers coding effort, the value of understanding business context, judging solution fit, and taking responsibility for design quality increases.
— There is no one-size-fits-all architecture; the goal is to leave room for future adjustment and keep core boundaries intact.
Conclusions

The author's framing treats architecture as a process of managing inevitable compromises rather than a pursuit of an ideal design, which is a practical stance for enterprise work.

When code generation becomes cheap, the real differentiator shifts to architectural judgment and the ability to articulate trade-offs, a point that resonates with recent AI coding trends.

The clothing-accessory metaphor for isolating special requirements argues against a purist approach to architecture, which is refreshingly honest about real-world constraints.

The essay implies that architectural success in long-lived projects depends more on organizational boundary-setting than on technical skill, a claim that is often under-represented in technical writing.

Concepts & terms
Architecture compromise
An accepted design deviation from the ideal architecture, usually forced by external constraints such as client demands or organizational decisions. The author advises isolating these compromises to limit their impact on the core system.
Module boundary
The clear separation between different parts of a system (e.g., shared components, business components, utilities). Well-defined boundaries prevent code coupling and make maintenance and future changes easier.
From the discussion
Featured comments
组合搭配函数

I support grouping by business cohesion rather than by technical layer; code following the business is less likely to scatter. The point that over-engineering is also a burden is on the mark—over-abstracting feels just as bad as not abstracting at all.

verohh

Thanks for the recognition. If business requirements come from internal design, they are controllable; developers can align with the existing architecture to upgrade and optimize. Often, however, a large number of external requirements conflict with the original design. A purely code-centric mindset offers a good development experience for developers, but it often leads to designs driven by developer convenience that drift away from real business needs. Conversely, over-adapting to external requirements through compromise can cause the original architecture to lose control, hurting development efficiency. Good design usually finds a relatively balanced point between the two.

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