What does "Repository pattern" mean in programming?
Repository pattern is one of the most common terms in software development. This guide explains what it means, how it is used in practice, and why it matters, with real examples from the developer world.
Definition
A design pattern that abstracts the data layer behind an interface. The repository is responsible for all database access: querying, saving, and deleting records. Business logic talks to the repository, not to the database directly. This makes it easy to swap databases or mock data in tests.
Example
"The UserRepository has findById(), save(), and delete() methods. The service layer calls the repository and never writes SQL directly."
Related terms
Ready to practice your English at work?
Lingua-e has interactive exercises built around real developer conversations: standups, code reviews, retrospectives, and more. Practice until it comes naturally.
Try Lingua-e for free