What Does Abstraction Mean?
Abstraction is a fundamental principle in some types of computer science. It is a key design aspect of object-oriented programming languages and application programming interfaces. It's also one of the least understood ideas in programming, partially for semantic reasons.
Abstraction is commonly defined as the extraction of relevant information from a larger data set, where utilizing abstraction allows engineers and others to simplify a codebase.
Techopedia Explains Abstraction
The reason this is confusing to many people is that abstraction doesn't “sound like” what it is, semantically. It sounds like making something more vague, because that's how we use it in general language.
However, in computer science, abstraction typically means simplification and separating the signal from the noise in order to make programming more efficient and effective.
In one of the most prominent examples of computer science abstraction, in object-oriented programming, abstraction often works by through the use of objects in code. These objects, as portable containers of attributes and repeatable code structures, abstract functionality that might otherwise be programmed in a linear way.
In other words, the vehicle for abstraction is the objects in the code, which take a whole bunch of underlying code and make it portable and repeatable.
Another conveyor of abstraction in object-oriented programming is the class. Classes of objects further stratify the principle of repeatable use and automated code proliferation.
For example, in this user-friendly guide for the non-techie at Stackify, the writer talks about how a coffee maker is a good example of how object-oriented programming uses abstraction to take so much of the labor-intensive work off of the programmer’s shoulders.
Instead of creating a virtual object such as a coffee maker from scratch, programming every line of its functionality by hand, engineers can instead invoke the object “coffee maker” and plug in “beans” and “coffee cups,” etc., to get the same result with much less work.
In fact, the abstraction that is at work in object-oriented programming is a prime way to show how powerfully these ideas support virtual “worlds” — when programmers can spin up all manner of virtual objects with their own attributes, they can more effectively model the real world, the physical world, and at the same time, optimize the effectiveness of a programmer’s labor-hour.
Both of those are exciting capacities that OOP brought the tech world.
Application Programming Interface
Another modern prime example of abstraction is illustrated in the application programming interface (API), which is so prevalent in cross-platform systems.
The API is a key way to provide that abstraction information so that outside third parties don't need to know as much about an inherent codebase. In a very simple sense, APIs are “connectors” — parties will use the API to connect one application’s code to another application’s code, to push data sets through a cross-platform environment, and allow these programs to collaborate in an automated way
The API, then, functions as the key vehicle of abstraction by building in those object-oriented principles that show the "outside program" what the "inside program" is doing.
In closing, abstraction is simply the process of making codebase information more versatile by simplifying how it's represented in external systems. That, however, has led to massive tech advances preceding other kinds of core change like the move toward virtualization of networks.