Olivier Lowe

This technical article is available in English.

FRONTEND ARCHITECTURE · ANGULAR · STATE OWNERSHIP

The Server Owns Some of Our State

The Order in the browser was state. That did not make the browser authoritative.

A frontend can hold a perfectly valid representation of server data and still be wrong about what is true now.

The Browser Had State

NovaTrade displayed Orders in the frontend. Once an Order had been loaded, the browser held its own representation.

Browser

Order
status → SUBMITTED

That representation mattered.

Components rendered it. Application behavior used it. The user made decisions based on it.

But holding the data did not make the frontend its authoritative owner.

Representation Is Not Authority

The important distinction was:

frontend representation
        ≠
authoritative server state

The browser knew what the backend had told it at some point in time.

That was not the same as knowing that nothing had changed since.

State ownership is not only about which component stores a value.

It is also about which system is authoritative for that value.

A Correct Copy Can Become Stale

Suppose the browser currently knows:

Browser

Order → SUBMITTED

Another actor can change the real Order on the server.

Browser
Order → SUBMITTED

Server
Order → CANCELLED

Nothing requires the browser representation to become invalid because its local state mechanism failed.

It may simply be older than the state now owned by the server.

The problem is freshness, not merely storage.

The Questions Changed

Once server authority was explicit, the frontend needed to ask different questions.

How fresh is this representation?

Can another actor change it?

What becomes stale after a mutation?

When should the frontend refetch?

Which cached representations are now invalid?

Which system is authoritative?

These questions describe the lifecycle of remote data.

They are different from asking whether a value belongs in a component Signal, a feature service, or another frontend state mechanism.

A Mutation Makes Authority Visible

The distinction becomes especially clear after the frontend asks the backend to change something.

For example:

frontend
    ↓
cancelOrder()
    ↓
server

The frontend can request the mutation.

But the server remains authoritative over the real persisted outcome.

After success, the frontend still needs a trustworthy representation of what now exists.

The Smallest Response Was Enough

Recognizing server-owned state did not automatically require a sophisticated synchronization architecture.

For the pressure NovaTrade had, the response could remain simple:

mutation succeeds
        ↓
refetch
        ↓
render authoritative result

The application asks the server again and replaces its previous representation with the authoritative result.

If that resolves the problem, there is no reason to add more machinery.

What This Did Not Earn

Remote state can become complicated.

But the existence of server-owned data alone did not justify every mechanism commonly associated with it.

WHAT THE PRESSURE EARNED

server authority
freshness awareness
stale-data reasoning
refetch after mutation

WHAT IT DIDN'T EARN

global store
sophisticated cache
optimistic updates
invalidation framework
synchronization engine

Those tools may become useful when additional pressure appears.

They were not necessary simply because some frontend data originated on the server.

This Was Not Yet an In-Flight Workflow Problem

Server-state authority and asynchronous interaction are related, but they are not the same concern.

SERVER STATE

authority
freshness
staleness
refetching
synchronization

IN-FLIGHT WORKFLOW

pending interaction
duplicate submission
response ordering
races
cancellation

Keeping those responsibilities separate prevented every asynchronous concern from becoming one generic state-management problem.

The Same Boundary Appeared Earlier

The in-memory adapter had already taught us that a frontend simulation was not the production system.

test adapter
    ≠
production system

Server-owned state exposed a related distinction:

frontend copy
    ≠
server authority

In both cases, the frontend could model useful behavior without becoming the source of truth for the real system.

The Lesson

Server state is not merely local state that happened to arrive over HTTP.

Its authority, freshness, and lifecycle belong to a different responsibility.

frontend copy ≠ server authority

CONTINUE THE ARCHITECTURE JOURNEY

State management starts with ownership.

This is one decision from my upcoming book Frontend Architecture with TypeScript, Angular, and React.

The book follows NovaTrade as frontend state, workflows, backend capabilities, framework boundaries, and runtime composition evolve only when real pressure requires them.

Explore the frontend architecture book →