DEV Community

Discussion on: What's an API, really? The elusive meaning of Application Programming Interface

Collapse
 
mgce profile image
Mateusz Gajda

In my opinion API is a public contract between creator of a class, component or library and consumer. For example simple domain object with a lot of properties can has API as a public method. It encapsulate private properties with this methods which increases the security of correct use of this class.
And we can replace class here with component or library. API is just a gateway.