DEV Community

Discussion on: What is an API?

Collapse
 
gdenn profile image
Dennis Groß (he/him)

Wow Salma that is really a great post.

I think many people forget that API is more of a general programming concept. Today everyone thinks about REST when someone says API.

But frameworks and libraries provide APIs too.

Have a look at the Java Spring framework for example. Spring provides abstraction layers that you as a user can interact with. Take the many annotations such as @Service as an example here.

These annotations are effectively also a form of APIs.

And they solve an important purpose. They make it very easy for the Spring developers to change implementation details of Spring without compromising the user experience directly by introducing "breaking changes".

So next time you work on a library or framework project, think about your API. Where is the interaction layer between the library-/framework user and your code base?

Try to avoid breaking changes in this API layer as much as possible. Your users will apreciate that.

Collapse
 
whitep4nth3r profile image
Salma Alam-Naylor

Thanks Dennis, you’re right!

I’m also working on a post titled ‘What is a REST API?’ to try and clear up the confusion as well.

Appreciate your comment!

Some comments have been hidden by the post's author - find out more