I'll Be Backend
Principles

Abstraction: Hide the Data Structure

Abstraction means callers use what an object does and never see how it stores its data, so the storage can change without them. These lessons take a warehouse whose stock map is read and changed by three classes, move each use into the warehouse as receive, pick and quantity, and make the map private, so keeping stock per delivery becomes a change inside one class.

Pick your language

When to use it

Use it when

Several classes read or change one collection, and the way it is stored may change.

Skip it when

One short function owns the map and nothing outside it reads it. Methods around it add lines and hide nothing.

Spot it by

get, put or merge called on another object's collection, or the same lookup copied into several classes.