educative.io

What is the repository pattern?

The course section on design patterns didn’t really go over the repository pattern. Could you expand on that a little and how that’s used in this case for locker repository and package repository?


Course: Grokking the Low Level Design Interview Using OOD Principles - Learn Interactively
Lesson: Class Diagram for the Amazon Locker Service - Grokking the Low Level Design Interview Using OOD Principles

1 Like

Hi @Yunfei_Xie,

The Repository design pattern separates the data storage and retrieval logic from the application logic by providing a central interface. Therefore, we have suggested that the Repository design pattern could be used to design this problem. It’s important to note that there may also be other ways to design this system.

Moreover, thanks for your suggestion. We will try to work on this.

Happy Learning :slight_smile:

1 Like