Menu

1 / 2

State in enterprise frontends: ownership before libraries

DEV Community: angular·Adil Ben Moussa·about 5 hours ago
#Vhnzx9le
#devtoangular#devto#dev#state#angular
Long article (1527 words) — no AI summary yet.
Reading 0:00
15s threshold

This is part 2 of 8 of the free series Frontend system design for enterprise applications , first published on tt-tech.io .

A support agent opens the link a customer sent: an account page, filtered on one category. The page shows all categories, because the filter lived in a component field and not in the URL. Nobody wrote a bug. The state was stored as the wrong kind.

That is the state problem in enterprise apps. The library choice comes last. First you decide what kind each piece of state is, who owns it, and how long it lives.

Five kinds of state

Server data. Accounts, transactions. The backend owns it; the frontend holds a copy that can be stale (part 3).

UI state. Which panel is open. Owned by one component, gone when it is gone.

Form state. A draft, its validation, whether it is dirty.

URL state. Filters, tabs, the selected record. Anything a link, a support ticket or the back button must restore.

Session state. The user and their roles.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.