Storing Data with the Repository Pattern

Learn how to implement a data store for Pomodoro intervals using the Repository patterns.

Overview

Let’s implement a data store for Pomodoro intervals using the Repository pattern. With this approach, we decouple the data store implementation from the business logic, granting flexibility for how we’ll store data. We can modify the implementation later, or switch to a different database entirely, without impacting the business logic.

For instance, we’ll implement two different data stores with this application: an in-memory data store and another data store backed up by an SQLite database. Later, we can implement another data store backed up by a different database, such as PostgreSQL, if we want.

Get hands-on with 1400+ tech skills courses.