A Quick Look at State
Holding state is an act of remembering. What we’re remembering is the data that models our system. We especially care about the transformation of that data resulting from actions taken in the system over time. The way we remember is to commit the data to memory on the host machine.
The reason we save state is so future actions can be consistent with the past. Say we created a new user profile in an application. If the user wants to change his email address later on, we better still have access to his original profile.
Most web applications present a twist to this story. As we mentioned in Chapter 1, Mapping Our Route, HTTP is a stateless protocol. It is specifically designed not to remember anything about requests—–actions ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access