O slideshow foi denunciado.
Seu SlideShare está sendo baixado. ×
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Carregando em…3
×

Confira estes a seguir

1 de 3 Anúncio

Mais Conteúdo rRelacionado

Semelhante a API.docx (20)

Mais recentes (20)

Anúncio

API.docx

  1. 1. API An API is the interface that allows two independentsoftware components to exchange information.An API acts as an intermediarybetween internal software functions and external ones,creating an exchange of information so seamless that it often goes unnoticed by the end user. What Are APIs Used For? APIs access the data of a particular software and work to make sure it is compatible with interacting software.End users do nothave directinteractions with APIs but rather reap the benefits once their requestis fulfilled. This is why an API is not an application itself,buta type of interface. If you're familiar with front-end web development,then you probablyhave some familiaritywith user interfaces . User interfaces are the graphical elementofa software productthat users come into contactwith. They are how you're accessing this very screen. Of course,on the back-end of the development,there is an abundance ofcode powering the internal structures that make navigating any software possible. Still, the front-end is what end users musthelm in order to access any software.Likewise,APIs are what software platforms mustface to gain accessibilityfrom one software to another. SAMPLE API Weather Google used the Weather Underground API. That service is now a part of IBM’s The Weather Company,which the weather snippetcurrentlylinks to in the bottom left corner LOG-in XYZ Instead of actually logging-in to users’ social media accounts (which would pose a serious securityconcern), applications with this functionalityleverage these platforms’ APIs to authenticate the user with each login.Fo r example,here’s the Facebook Login API. The way it works is pretty simple.Every time the application loads,ituses the API to check whether the user is already logged in by means ofwhatever social media platform.If not, when the user clicks the “Log-in Using XYZ” button, a pop-up opens where they are asked to confirm they actually want to log-in with that social media profile. When the user confirms,the API provides the application with identification information,so itknows who’s logging in. PAYPAL In terms of the inner-workings ofthis handy function, it’s very similar to the log-in process described above.When the user clicks the “Pay with PayPal” button, the application sends an “order” requestto the PayPal API, specifying the amountowed and other importantdetails.Then,a pop-up authenticates the user and confirms their purchase.Finally, if everything goes to plan,the API sends confirmation ofpaymentback to the application. 5 Examples of API Integration Use Cases For some more detail on how API integration can help your business,read justbelow.The following examples provide the mostcommon API integration use cases.
  2. 2. 1. Connect Cloud AppsCloud apps are software applications where much ofthe back-end technology,like the logic and data is accessed online through the internetrather than through a local machine. Considering that Amazon Web Services (AWS) — a cloud platform that provides servers,storage,networking,and more — controls over a third of the market, you’re probablymore familiar with cloud apps than you think. Google Docs is a prime example ofa cloud app. API integrations are the standard for connecting cloud apps these days. Circling back to Google Docs, this is how one would consolidate their documentation with apps like Google Sheets,Slack,Discord,GitHub, and dozens of other cloud applications. 2. Creation of Custom APIsNaturally, using pre-written APIs doesn’talways make ends meet. Sometimes onlycustom software can be efficient and flexible enough to work for your project. When this is the case,you have the option of developing a custom API. 3. Ease the Development of Apps To some extent, APIs are a method of standardization. Instead of writing and rewriting code to facilitate this type of integration, APIs serve as outlines to streamline the same process. At the heartof manypopular apps are pre-written APIs holding everything together. API integration is a quick and easy way to draw several different functionalities into one high-functioning and performative app. 4. Strategic Team Movement Software as a service (SaaS) companies can create APIs for you when building APIs from scratch isn’texactly lucrative. More often than not, this is a common occurrence. Besides speeding up development,this specific mode ofAPI integration can boostproductivity for your team.Accelerating the software developmentprocess is keyto successful app releases. 5. Multiple Services Management From a managementperspective,using APIs is simplyeasier.Tracking how multiple services work and are integrated with other services can be quite a task. A task of this kind may require a plethora of individuals picked from numerous ITdepartments or software developmentteams. APIs are like “lego blocks”,according to Trio co-founder Alex Kugell.And it’s a lot easier to keep track of the pieces you put together than to find the ones that are strewn across one end of your hypothetical playroom to the other. How To Build API Integrations Building an API integration is much like developing a regular old software application.It requires dedication and skill. There are four essential steps thatyou should accountfor. Research Any endeavor you’ve undertaken whole-heartedlylikelyinvolved some research.APIs are no different. You need to get a fundamental understanding ofhow APIs work. Starting with the domain where you want your API to run mightbe a good idea. If you’re building API integrations for web development,for one, you should read up on REST APIs. Prototype Designing a prototype is the next step. Prototypes have minimum functionalitybutthey should provide a base foundation for whatyour API will look like. This stage shouldn’ttake long at all, a week at most. Minimum Viable Product(MVP) An MVP is a step up from a prototype. It represents a beta version of your API which you can test. Not unexpectedly, this will take longer to build than a prototype. Set aside two weeks maxfor MVP development.
  3. 3. Related reading: Know The Top 7 API Integration Tools Transaction Management Transactions describe an API call on your website or application. Your job where transaction managementis concerned is to figure out what to do if a transaction doesn’tgo as planned.Withdraw the transaction ifnecessary and debug the problem. For many years we have relied on third-party JavaScript libraries such as jQuery to write JavaScript for the web. However, in recent years, the DOM API has evolved a lot, so adding dynamic functionality to web pages using native JavaScript is becoming easier for developers. This article is a high-level overview of the DOM API builtinto every modern web browser.We’ll look into whatthe DOM API is, how it’s related to JavaScript, and how you can use it to write JavaScript for the web. The DOM API is one of the multiple web APIs built into web browsers.There are lower-level APIs such as the Web Workers API (for background operations) and higher-level ones such as the DOM. Most web APIs, including the DOM API, are written in JavaScript. First, the W3C creates the specifications, then browser vendors implement them. Thus, “browser support” refers to whether a browser has implemented a specific functionalityof the DOM API or not. If browser supportis good,you can safelyuse an object(interface implementation), property, or method in production,while if it’s poor, it’s better to find an alternative (you can check browser supporton the CanIUse website). You use the javax.xml.parsers.DocumentBuilderFactory class to get a DocumentBuilder instance, and you use that instance to produce a Document object that conforms to the DOM specification. The builder you get, in fact, is determined by the system property javax.xml.parsers.DocumentBuilderFactory, which selects the factory implementation that is used to produce the builder. (The platform's default value can be overridden from the command line.) You can also use the DocumentBuilder newDocument() method to create an empty Document that implements the org.w3c.dom.Document interface. Alternatively, you can use one of the builder's parse methods to create a Document from existing XML data. The result is a DOM tree like that shown in above Figure . Note - Although they are called objects, the entries in the DOM tree are actually fairly low-level data structures. For example, consider this structure: <color>blue</color>. There is an element node for the color tag, and under that there is a text node that contains the data, blue! This issue will be explored at length in the DOM lesson of this tutorial, but developers who are expecting objects are usually surprised to find that invoking getNodeValue() on the element node returns nothing.

×