D
D
dron1122021-01-28 23:40:59
Programming
dron112, 2021-01-28 23:40:59

What is "Abstraction Layer" or "Abstraction Layer"?

Explain in simple terms what is "Abstraction Layer" or "Abstraction Layer"?
Preferably in the context of JavaScript and in the context of real life if possible.
It is possible with examples on Js.
And even better, how would you answer this question if it was asked to you at the interview

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
dollar, 2021-01-28
@dron112

In real life, the boss doesn't hammer nails or twist wires. He tells which department to do what.
The middle manager listens to his boss and tells his subordinates what to do. Approximately as in the army, in short, only voluntarily (for money). That is, it only works within its abstraction layer , as you put it.
Well, and so on.
The bottom line is that it is quite difficult to capture the whole picture, which includes all the nails and screws. Therefore, it has to be cut into "layers", each of which can be considered separately and solve problems without going beyond its limits. That is, you need to share it in such a way that it is all possible, and not just anyhow.
Another analogy with a computer. At the top level, this is the system unit + monitor + keyboard + mouse. At this level, a mediocre user will be able to assemble it (connect it when moving to a new apartment). The next level already includes the stuffing: hard drives, processor, mat. board, power supply, etc. On a keyboard, for example, each key can be considered separately. At this level, an advanced user will be able to rebuild the computer for themselves, repair, upgrade, etc., i.e. solve real life problems. Well, even deeper - this is the level of microcircuits and programming (which also has its own levels, of course).

S
Saboteur, 2021-01-29
@saboteur_kiev

Well, the "eat a cutlet" command is a level of abstraction.
Because a cutlet can be a different cutlet. from different meats. In different conditions.
You don't give the command to raise your hand, stretch your hand forward, close your fingers, make sure they grab the cutlet, and so on. You control the abstraction layer. Under it is already fine motor skills. Under it is even finer motor skills of the body, such as peristalsis. Below it is an abstraction of the biochemical level, and there are already atoms and so on. But you summarize it all with the words "digested" or "even you need to drink mezin."
In IT, where a lot of specifics are needed, there are many levels of abstraction on various layers - operating system, language, framework, library, methods, structures - everything has something of its own.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question