22 Jun 2020
An application can be defined as a set of use cases.
It often happens that use case A requires a previously executed use case B for its execution.
In such situation, it should be ensured that use case B has been executed while executing use case A.
To achieve this, application state that is common to both use cases, is introduced.
The state must be persisted to be visible to more than one use case.
Most often, various types of databases are used for this purpose.
While working with source code, I have encountered various methods of persisting the application state.
I also came up with my own variations.
In this post I will make a subjective comparison of these methods based on specific criteria.