Interfaces #
The term interface is used to refer to a variety of artifacts. For instance (in computer science alone): (graphical) user interface, command-line interface, Application Programming Interface (API), hardware interfaces, etc.
What do these have in common?
One may think of an interface as a set of conventions adopted by two “agents” (human being, program, …) to communicate. For instance:
- if Alice sends a message to Bob, then she has to use a language that Bob understands,
- if Alice uses git via command-line, then she has to use a command that git recognizes as a possible input,
- if a program calls git, then it also has to use a command that git recognizes as a possible input,
- etc.
Warning. A program interface usually specifies communication in one direction only. So when two programs communicate, they may use different interfaces, one in each direction (a rough analogy could be communication between a human being and a dog).