The need to persist data
When building any kind of mobile application, we are trying to solve users’ problems, provide them with an easy way to achieve certain tasks, or entertain them. Whatever we are doing, there’s data involved. Whether it’s a simple to-do app or a complex game, the application needs this data to function properly. So, this data has to be persisted throughout the life cycle of an application. When talking about data persistence, we can think of two types. The first is remote data persistence, where we store data in a remote server and access it via HTTP requests. The second is offline or local data persistence, where we save the data locally on a device and access it without the internet. However, local data is available only on that device; if the device is reset or the user changes the device, this data is not available. Even when remote data is involved, we sometimes persist it locally to make the application responsive and performant.
...