PROGRAMMING:- Developers use API's to write software.
INTERFACE:- How you interact with the application.
API's let your product or service communicate with other products and services without having to know how they are implemented. This can simplify app development, saving time and money. When you are designing new tools and products--API's give you flexibility, simplify design, administration, and provide opportunities for innovation.
TYPES OF API'S
1).System API:- These type of API's are responsible for managing all of the configuration within a system. To use an example, a system API unlocks data from a company's billing database.
2).Process API's:- It take data accessed with system API's and synthesize it to create a new way to view or act on data across system. To continue the example, a process API would take the billing information and combine it with inventory information and other data to fulfill an order.
3).Experience API's:- It add context to system and process API's. These types of API's make the information collected by the system and process API's understandable to a specified audience.
API'S ON CLIENT-SIDE JAVASCRIPT
Client-side JS, in particular, has many API's available to it-- these are not part of the JS language itself, rather they are built on top of the core JS language, providing extra superpower to use in JS code. They generally fall into two categories:
BROWSER API'S:- They are built into your web browser and are able to expose data from the browser and surrounding computer environment and do useful complex things with it. For example--taking an audio track, alerting volume, applying effects to it, etc. In the background, the browser is actually using some complex lower code to do the actual audio processing. But again, this complexity is abstracted away from you by the API.
THIRD-PARTIES API'S:- They are built into the browser by default, and you generally have to retrieve their code and information from somewhere on the web. For Example, the twitter API allows you to do things like displaying your latest tweets on your website. It provides a special set of constructs you can use to query the Twitter service and return specific information.
WAHT API'S CAN DO?
API's for manipulating documents loaded into the browser. The most obvious example is the DOM API, which allows you to manipulate HTML and CSS creating and removing and changing HTML, dynamically applying new styles to your page, etc. Every time you see a popup window appear on a page or some new content displayed, for example, that's the DOM in action.
APIs that fetch data from the server side to update small sections of a webpage on their own are very commonly used. This seemingly small detail has had a huge impact on the performance and behaviour of sites-- if you just need to update a stock listing or list of available new stories, doing it instantly without having to reload the whole entire page from the server can make the site or app feel much more responsible and "snappy". API'S that make this possible include XML HTTP-Request and the Fetch API.
Client-side storage API's are becoming a lot more widespread in we browser--the ability to store data on the client-side is very useful if you want to create an app that will save its state between page loads, and perhaps even work when the device is offline. There area number of options available, e.g. simple name/value storage with the web storage API, and more complex tabular data storage with the Indexed DB API.
0 Comments