Skip to content
← Insights
Nov 14, 20264 min read

Trace one page before choosing its frontend architecture

A cold-load trace exposes the work behind an architecture label. Compare readable first content with the first usable interaction.

A browser-page sheet connected to a small delivery path, with a cart icon and a measuring ruler beside it.

Follow one product page through a cold load before choosing its frontend architecture. The trace should show what reaches the browser first and what must happen before a customer can use the page.

An architecture label leaves much of that work unspecified. Server-rendered HTML can still be followed by substantial JavaScript. A modular application can still make the user wait for a remote module. The useful comparison is between actual delivery paths.

Start with the page's first useful state

Consider an illustrative catalogue page with a product description and an add-to-cart interaction. The description can be readable before the cart becomes interactive. If both wait for the same large client bundle, the implementation has coupled two different user needs.

The web.dev rendering guide, updated in January 2026, distinguishes server rendering from client rendering and hydration. Hydration runs client code to attach interactivity to existing HTML. Receiving HTML therefore describes one stage in delivery, with the browser's later work still relevant.

Inspect the initial response to establish whether it contains the product information. Then measure when the cart can accept an action. A visible control that cannot yet respond needs to be included in the interaction test.

The server path also has costs. If generating the description waits for an unnecessarily slow query, moving the work to the server can leave the initial response delayed. The trace should include that wait instead of assigning speed to the architecture name.

Attach interactivity where the page needs it

Astro's island architecture is one documented way to deliver mostly HTML while hydrating selected components separately. It gives developers explicit control over which components run client-side JavaScript and when they load.

For the catalogue example, a cart control may need immediate interaction once the customer sees it. A carousel far below the description may have a later loading point. Their loading conditions should follow their use on the page.

Components that share state need an explicit communication path. If adding to the cart updates a count in the header, the two parts must agree on the cart state. Splitting them visually does not create that agreement automatically.

A highly interactive workspace presents a different case. If the task depends on continuous local manipulation of many shared objects, a larger client-side application can match the work. Measure the transitions the user performs repeatedly, with the state the application must retain between them.

A deployment boundary creates a runtime obligation

Webpack's ModuleFederationPlugin documentation describes sharing modules between independent builds at runtime. That capability can support separate deployment schedules. It also creates an integration point the delivered page has to handle.

Suppose the catalogue shell loads a cart from a separately deployed build. Test what happens when the remote cannot load. A customer should still be able to read the product information. The cart needs a visible failure state if purchasing is temporarily unavailable.

The teams also need an agreement about shared dependencies. An independently released module can arrive with assumptions about the runtime or design system. Record the compatibility rule so a team can release without guessing which shell version will consume its module.

A shared repository can simplify coordination, but repository layout is a separate choice from runtime composition. Keeping code in one repository does not automatically create one deployment. Equally, separate teams can own routes within a single deployable application.

Choose the deployment boundary for a coordination problem you can name. If every small change still requires all teams to release together, inspect whether the chosen module boundary supplies the independence it was meant to provide.

Styling can use information already available to the browser

CSS can handle layout conditions that previously prompted custom JavaScript. Container queries let a component's styling respond to its container. A product card can therefore adapt when placed in a narrow sidebar without relying only on the viewport width.

That capability does not establish a need to replace every styling library. Identify the work the current system performs. If it calculates a layout condition already expressible in CSS, test a native rule for that condition. If it supplies runtime values, examine how those values reach the rendered style.

Check the result at the widths your product uses. A card can fit its text on a wide catalogue route while clipping the same text in a comparison panel. The component's actual container is part of the test.

Keep the delivery record as well. A visual match after a warm reload can conceal an unstyled first render. Inspect the cold-load state to see whether the required styles arrive before the page becomes useful.

Let the trace justify the boundary

For the catalogue page, a useful acceptance record contains the readable first response and the first successful cart action. It also shows what the customer sees if a remote module fails. Each observation corresponds to a boundary the architecture introduced.

Compare the proposed change with the same page before the change. Keep its tested data and device conditions consistent. A smaller bundle is useful when it removes work the user was waiting for; the measured page behaviour shows whether that happened.

Choose the next architecture change where the trace exposes a specific delay or coordination failure. That gives the team a result to verify after the change reaches the browser.

FrontendArchitecturePerformance