# Abstraction (Programming)

> Showing only what you need to use a thing. The details stay hidden.

**Field:** Software Development  
**Category:** Programming Paradigms  
**Also known as:** Abstraction, Abstract Class

## Think of it like

Think of it like driving a car. You use the wheel and the pedals, and never touch the engine.

## Definition

Abstraction means showing only what you need to use a thing. The messy details stay hidden behind it. A sendEmail function hides the servers, ports and retries inside it. You think in big, simple steps instead of tiny ones. Every function, class and library is a layer of it. Good ones let you forget the details; bad ones leak them at the worst time.

## Example

Emma calls save(order) and the order is stored. She never sees the SQL, the connection or the retry rules inside it.

## Why it matters

It lets people build huge programs without holding each detail in mind.

## Common mistake

Adding layers before you need them. Three small copies of code can be clearer than one clever layer.

## Three principles

- **Show what matters.** A simple way to use it.
- **Hide the details.** They live behind the layer.
- **Layers stack.** Functions, classes, libraries.

## Related terms

- [Encapsulation](https://learn.benibix.com/term/development/encapsulation)
- [Interface (Programming)](https://learn.benibix.com/term/development/interface)
- [Function](https://learn.benibix.com/term/development/function)
- [Object-Oriented Programming (OOP)](https://learn.benibix.com/term/development/object-oriented-programming)

## Told apart from

- [Encapsulation vs Abstraction](https://learn.benibix.com/compare/encapsulation-vs-abstraction): Encapsulation and abstraction both hide things, but not the same things. Encapsulation hides an object's data, so only its methods can change it. Abstraction hides how a job is done. You see only a simple way to use it.

---

Source: https://learn.benibix.com/term/development/abstraction
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
