Advanced Platform Frontiers
(Knowing when the web platform needs more than components)
Senior rule:
Advanced frontend is still frontend: performance, accessibility, security, and failure behavior do not disappear.
Some Atlas surfaces are conventional dashboards. Others need offline behavior, heavy filtering, 3D visualizations, or team-owned modules. Senior engineers should know the shape and cost of these platform capabilities before recommending them.
Service Workers and PWA
Service workers sit between the page and network. They can cache, intercept requests, support offline fallback, and enable advanced app behavior.
if ("serviceWorker" in navigator) {
window.addEventListener("load", () => {
navigator.serviceWorker.register("/service-worker.js");
});
}
Use cases:
- offline fallback
- repeat navigation speed
- background sync where supported
- push notifications where justified
Risks:
- stale assets
- broken update lifecycle
- confusing cache invalidation
- debugging complexity
Web Workers
Move CPU-heavy work off the main thread when it blocks interaction.
// report.worker.ts
self.onmessage = (event: MessageEvent<{ rows: Row[]; query: string }>) => {
const result = event.data.rows.filter((row) =>
row.customer.toLowerCase().includes(event.data.query.toLowerCase())
);
self.postMessage(result);
};
const worker = new Worker(new URL("./report.worker.ts", import.meta.url));
worker.postMessage({ rows, query });
worker.onmessage = (event: MessageEvent<Row[]>) => {
setVisibleRows(event.data);
};
Workers help CPU-bound tasks. They do not make network or DOM work faster, and data transfer has a cost.
Microfrontends
Microfrontends can help when ownership and release independence are the real constraint.
They add:
- duplicated runtime risk
- version compatibility concerns
- observability complexity
- shared design-system pressure
- remote failure modes
Before adopting, require:
- stable domain boundaries
- performance budget
- fallback behavior
- shared dependency strategy
- contract versioning
- team ownership
WebGL and Three.js Awareness
Atlas may add a 3D product usage map. A senior engineer does not need to be a graphics expert, but should understand the cost model.
"use client";
import { useEffect, useRef } from "react";
import * as THREE from "three";
export function UsageCube() {
const canvasRef = useRef<HTMLCanvasElement | null>(null);
useEffect(() => {
if (!canvasRef.current) return;
const renderer = new THREE.WebGLRenderer({
canvas: canvasRef.current,
antialias: true,
});
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(75, 1, 0.1, 100);
camera.position.z = 2;
const geometry = new THREE.BoxGeometry(1, 1, 1);
const material = new THREE.MeshBasicMaterial({ color: 0x3b82f6 });
const cube = new THREE.Mesh(geometry, material);
scene.add(cube);
let frame = 0;
function animate() {
cube.rotation.x += 0.01;
cube.rotation.y += 0.01;
renderer.render(scene, camera);
frame = requestAnimationFrame(animate);
}
animate();
return () => {
cancelAnimationFrame(frame);
geometry.dispose();
material.dispose();
renderer.dispose();
};
}, []);
return <canvas ref={canvasRef} aria-label="3D usage visualization" />;
}
Key concerns:
- asset size
- frame budget
- GPU memory
- resize handling
- disposal
- battery use
- accessibility alternatives
- fallback for unsupported devices
WebGPU Awareness
WebGPU gives modern GPU access for graphics and compute workloads. It is powerful, but support and complexity require careful fallback planning.
Ask:
- is WebGL enough?
- does the product need GPU compute?
- what is the fallback?
- what devices are supported?
- who owns graphics expertise?
Mini Case Study: Worker vs WebGL
Atlas had a slow report table and a proposed 3D visualization. The table needed Web Workers and virtualization. The visualization needed Three.js with a static accessible summary.
Senior decision:
- do not use 3D to solve table performance
- move filtering off the main thread
- use Three.js only for the visualization surface
- provide text and table alternatives
Advanced tools solve specific problems. They are not maturity badges.
Common Failure Modes
- Adding a service worker without an update strategy.
- Moving work to a worker when the bottleneck is network or DOM.
- Using microfrontends for ordinary code organization problems.
- Shipping 3D without memory disposal.
- Ignoring accessibility alternatives for canvas/WebGL.
- Adopting WebGPU without fallback.
Review Checklist
- Is the advanced capability solving the actual bottleneck?
- Is fallback behavior defined?
- Is update and cache invalidation owned?
- Is main-thread responsiveness protected?
- Is accessibility preserved?
- Are assets and memory measured?
- Is ownership clear after launch?
Senior Deep Dive: Advanced Platform Decision Quality
Senior engineers should know advanced platform capabilities, but they should also be skeptical of them. Service workers, workers, WebGL, WebGPU, storage APIs, and microfrontend runtimes can unlock major product value. They can also create invisible lifecycle, debugging, accessibility, and rollback problems.
Capability decision matrix
| Capability | Strong use | Senior concern |
|---|---|---|
| Service worker | offline shell, asset caching, background sync | stale code, cache corruption, update lifecycle |
| Web worker | CPU-heavy pure computation | serialization cost, worker lifecycle, debugging |
| Shared worker | shared connection or state across tabs | browser support and ownership complexity |
| WebAssembly | portable compute-heavy module | bundle size, initialization, debugging, accessibility irrelevance |
| WebGL/Canvas | dense visualization, graphics, games | accessibility fallback, GPU memory, text/semantics loss |
| WebGPU | advanced compute/graphics | support, security constraints, graceful fallback |
| Microfrontend runtime | independent team deployment | runtime integration, duplicate dependencies, UX drift |
| Storage APIs | offline/draft/cache behavior | privacy, quota, eviction, stale data |
The weakness this corrects: choosing a platform feature because it is impressive rather than because it is the smallest reliable solution.
Service worker readiness
Do not add a service worker until the team can answer:
- What is cached and why?
- How are caches versioned?
- How does new code replace old code?
- What happens when cached API data conflicts with server truth?
- How is logout handled?
- How does the app recover from a bad service worker?
- How is the offline state communicated?
- Which metrics prove the service worker helps rather than harms?
Service workers are especially dangerous because they can keep broken delivery logic alive after rollback.
Worker offload decision
Move work to a worker when the work is CPU-heavy and blocks interaction, the input/output can be serialized cheaply, the result is not needed synchronously during render, failure can be handled as a normal state, and profiling proves main-thread relief. Do not move work to a worker just to avoid understanding why the main thread is busy. Worker architecture introduces protocols, lifecycle, error handling, and testing needs.
Graphics and accessibility contract
Canvas/WebGL experiences need a parallel accessibility model: keyboard interaction, semantic summary, text alternatives for critical data, focus management around controls, reduced-motion behavior, non-visual access to selected values, and fallback or export for data-heavy visuals. If the visual is decorative, keep it isolated. If it carries product meaning, it needs an accessible equivalent.
Platform adoption ADR
For any advanced platform feature, require:
| Field | Required answer |
|---|---|
| Product need | What user outcome cannot be solved simply? |
| Capability | Which browser API/runtime is chosen? |
| Fallback | What happens without support? |
| Lifecycle | How are updates, cleanup, and rollback handled? |
| Observability | What errors, performance, and usage signals are tracked? |
| Ownership | Who maintains the platform code after launch? |
Exercises
Exercise 1 - Capability Fit
Choose one problem and decide whether it needs service workers, workers, microfrontends, WebGL, WebGPU, or none.
Exercise 2 - Worker Candidate
Find one CPU-heavy interaction and sketch a worker boundary.
Exercise 3 - 3D Risk Review
For a 3D feature, document asset loading, fallback, disposal, accessibility alternative, and performance budget.
Further Reading
- MDN: Service Worker API - https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API
- MDN: Using Web Workers - https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers
- MDN: Progressive web apps - https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps
- Three.js docs - https://threejs.org/docs/
- W3C: WebGPU - https://www.w3.org/TR/webgpu/