Repository: Ask for the Book, Not the Shelf

When the checkout service talks to the database in the database's own words (tables, rows, columns, dates stored as text), every class that needs loans copies that code, tests need a database, and a new database means editing them all; a repository puts loans behind one interface in the app's own words, so a class asks for a loan and never learns where it's kept.

By

Updated

Cheat sheet: Repository: Ask for the Book, Not the Shelf
Category
Data Structures
Level
Journeyman
Tags
Dependency Inversion Principle, Interface, OOP, Repository Pattern, software-development