What frontend architecture is
Frontend architecture is the set of decisions that are expensive to reverse: how the application is structured, where page content is generated (on the server, in the browser, or a combination of both), and how teams ship.
We'll explore where and when page content is generated in Rendering architectures.
Frontend architecture shapes how an application reaches users and how teams change and deliver it. Performance, interactivity, cost and team independence are considerations when evaluating trade-offs: what benefits does a choice provide, and what costs or limitations does it introduce?
Why the frontend needs it now
Browser applications have grown into systems as complex as backends, with many teams, many releases and high user expectations.
A change to shared navigation or sign-in can affect several teams' screens. Clear responsibilities and interfaces help teams coordinate those changes without having to understand every part of the application.
The forces behind every decision
Team size, release speed, SEO and marketing needs, performance, offline needs, and budget shape which trade-offs are worth making.
For a browser-based UI, these choices play out across users' devices, browsers and network connections. They affect how screen state is preserved during navigation and whether controls behave consistently across the application.
The core trade-offs
There's no best pattern, only trade-offs. Every architectural choice gives you something and costs you something.
Simplicity vs. team independence
- Closely integrated code: Keeping code closely integrated, with fewer explicit boundaries, makes features easier to connect and change together, but teams must coordinate overlapping changes.
- Team-owned modules: Defining team-owned modules with clear boundaries lets teams change implementation details more independently, but requires maintaining interfaces and coordinating changes across those boundaries.
Takeaway: In delivery terms, clearer boundaries can help teams deliver in parallel, but take effort to establish and maintain. We’ll explore these choices in One app or many? From monolith to micro-frontends.
Clean structure vs. speed right now
- Upfront structure: Separating concerns and setting boundaries takes upfront effort, but keeps responsibilities clear and limits how far a change spreads. This makes features easier to test and change independently, though establishing that structure can slow initial delivery.
- Faster initial delivery: Skipping that upfront structure can get a working feature to users sooner, helping you gather feedback and test whether the idea is worth further investment. The trade-off is that responsibilities can become tangled, making later changes harder to isolate, test and deliver.
Takeaway: In delivery terms, this is technical debt in practice. You're borrowing time from future sprints.
First-load speed vs. rich interactivity
- Server-rendered and static pages: Server-rendered and static pages can show content quickly and are good for SEO, but JavaScript-dependent controls may take longer to become usable. Hydration connects JavaScript behavior to the existing HTML so those controls can respond to users.
- Client-heavy applications: Client-heavy applications can feel snappy once loaded because they can update the screen without reloading the whole page, but running JavaScript and fetching data before showing content can make the first visit slower.
Takeaway: In business terms, these performance differences can affect search traffic, bounce rates and conversion.
Server cost vs. client cost
- Server-side work: Doing work on the server means higher hosting bills and more infrastructure to run.
- Browser-side work: Doing work in the browser reduces server computation, but depends on the user's device and network.
Takeaway: The same question comes up in any system spread across many machines: where should the work and the caching happen?
Reach vs. device capability
- Web applications: Web applications, including progressive web applications ( PWAs ), give you one codebase that runs wherever a compatible browser is available. Direct distribution through the web avoids app-store review delays.
- Native applications: Native applications offer broader access to device and operating-system features and can be distributed through app stores, but supporting multiple platforms can mean maintaining separate codebases or repositories, with additional development, testing and release work.
Takeaway: In business terms, this is a classic budget and time-to-market decision.
Flexibility vs. consistency
- Team-chosen tools and APIs: Letting each team choose its own tools and APIs gives autonomy. It also risks an inconsistent user experience, duplicated work and harder hiring.
- Shared standards: Standardizing reduces that risk but slows teams that need something different.
Takeaway: Choose where teams need autonomy and where users need consistency.
Optimizing for today vs. for growth
- Designed for a 50-person organization: Architecture chosen for a 50-person org will overwhelm a 5-person team.
- Designed for a 5-person team: Architecture chosen for a 5-person team will struggle to support a 50-person organization as more teams need to coordinate changes and releases.
Takeaway: The skill is picking for the team and product you have now, with a clear point where you'd change.
Check your understanding
Quiz
How much structure should an uncertain feature get now?
A team has a week to test whether customers choose to use a new comparison panel. The panel could be built into the existing page or designed for reuse across several pages. Which plan best balances learning now with the cost of future changes?
Review questions and explanations (text alternative)
-
How much structure should an uncertain feature get now?
A team has a week to test whether customers choose to use a new comparison panel. The panel could be built into the existing page or designed for reuse across several pages. Which plan best balances learning now with the cost of future changes?
- Invest the week in reusable infrastructure before testing demand.
- Run a small trial; document temporary design compromises and revisit them before expansion.
- Create a separately deployed application to make eventual removal easier.
- None of the above
Suggested answer: Run a small trial; document temporary design compromises and revisit them before expansion.
A small trial leaves time to observe customer use. Document temporary design compromises and review them before expansion to manage future change costs. Reusable infrastructure or a separate deployment adds too much work before demand is known.
-
What should the team prioritize in this workspace?
A customer-support workspace takes several seconds to open, but agents then switch records quickly without full-page reloads. They keep it open throughout their shift. What should the team prioritize?
- Replace in-browser updates with full-page navigation to improve opening speed.
- Load every customer record at startup to make subsequent switching faster.
- Investigate the startup bottlenecks while preserving fast record switching.
- Leave startup unchanged because agents only open it once per shift.
Suggested answer: Investigate the startup bottlenecks while preserving fast record switching.
Opening once per shift limits the benefit of faster startup, but doesn't establish whether an inexpensive improvement is available. A short investigation can inform that decision without committing to a redesign. Full-page navigation adds repeated loads, while preloading every record adds startup work.
-
Which finding most strongly supports native applications?
A team is building an inspection tool for use on phones and laptops. Inspectors need to take photos and complete forms offline. The team is considering native applications instead of a browser-based tool. Which finding would best justify the additional platform-specific development and testing?
- Inspection forms must remain editable without a network connection.
- On supported devices, the required camera workflow fails browser tests but passes native tests.
- Users prefer finding and installing tools through app stores.
- The prototype's controls better match the operating system's appearance.
Suggested answer: On supported devices, the required camera workflow fails browser tests but passes native tests.
A required camera workflow that fails browser tests but passes native tests gives concrete evidence for native development costs. Offline editing is possible in browser applications. App-store preferences or native-looking controls do not demonstrate the same required capability gap.