What is State? Data and Programming
About
State are the attribute values of a thing (entity) at a given moment.
A State can be seen as a snapshot of values at a precise moment.
Code is easy,
State is hard
Example
- File:
- if a line was added to a file, the file has a new state
- if the owner changed, the file has a new state
-
- if a variable has a new value, the variable has a new state
- A on/off button has two states:
State modification
You can modify the state only in 2 ways:
- event-driven
- state driven
Reactive / Event-Driven
Tracking the changes to values as your program runs and propagating this change is called reactive programming.
And is the core of event-driven data application.
Lifecycle / State driven
Automata models computing devices or machines through state transition. See Automata - State
A entity may have several related primary state stored in a attribute called status that forms together a lifecyle(ie automata)
State History
See Data - History (Versioning) - Historical Data

