Friday, June 19, 2020

What is API


API stands for Application Programming Interface

API is developed for exposing built-in services which can be reused anywhere in our application or can access from outside world.

Many of the functionalities are converted to API so that programmers do not have to re-code or re-build the same for using it in different parts of the applications.

one of the examples of the API is Graph API developed and made available by Facebook, Google and Microsoft etc..
If a developer wanted to upload a post from the mobile app they don't have to download Facebook SDK to build and upload in web. they can simply register the mobile app with Facebook and start using the GraphAPI which enables the programmer to do CURD operations like upload post, delete post and update post etc..

Microsoft and Google also provides similar Graph API to use their inbuilt services like O365 calendar, google calender etc.. with a simple RESTApi call. 

Example of simple API usage: lets assume that DAO layer in big application is developed as API and running a application server. all the CURD operations are exposed as API endpoints and can be accessed using RESTFull service call.


Now we can access this API from any where [where we have access to the host] and the client below could be developed in any language of our preference. 


API using in Micro Services:

We all know the pain points in maintaining Monolithic applications and advantages in converting them to Micro Services Module based architecture.

API is used as a gateway to access different modules in Micro Services Architecture. below flow depicts advantage in splitting one big application into different smaller modules and interact them using API.



There are different tools and frameworks available to generate template for API development. few popular frameworks are spirgboot(spring.io), swagger openAPI(editor.swagger.io), python Django and Falsk etc..

Conclusion:

API is used to expose the different functionalities to the outside world to access it over the internet. so it can be used to communicate between the modules developed in different languages with the application or it can be used to expose necessary services to the application running on whole different Network or organization.

This makes each module in the application lightweight and can be developed, test, deploy and maintain independently. It also brings both development and Operations close together and forms DevOps.

Though API has many advantages like saving development time and effort, easy of maintenance, speed in development and avoid production bugs. There are disadvantages as well, they would impose extra latency in exchange data over internet and API developers has to give top priority in building security around the applications.



0 comments:

Post a Comment

Popular Posts

Blogger templates

Blogroll

About

Powered by Blogger.

Wikipedia

Search results