abstraction

A simplified description of what something does, such as an interface, that hides how it does it.

In more detail

Code that depends on an abstraction can work with any implementation of it, which makes parts easy to swap and test. A good abstraction speaks in the caller's terms; a poor one merely renames the thing it wraps.

Examples

C#: registering IProductRepository against SqlProductRepository in the dependency injection container
In Python, a function with parameters is abstraction in action: happyBirthday(person) works for any name.

Related terms

Taught in

References