Learning Library

← Back to Library

APIs vs SDKs: Streamlining Cloud App Development

Key Points

  • An API (Application Programming Interface) acts as a standardized bridge that lets apps or services communicate, abstracting away complex internal logic so developers only need to request the data they need.
  • In the example of a veterinary clinic mobile app, the app would use a cloud‑based visual‑recognition API to POST an image of a pet and receive the pet’s name and file information.
  • REST is the most common API style highlighted, using HTTP methods (POST, GET, PUT, DELETE) together with optional parameters to structure requests and responses.
  • APIs are defined by industry standards such as SOAP, GraphQL, and especially REST, which ensures consistency and interoperability across different systems.
  • SDKs (Software Development Kits) bundle these APIs with code libraries, tools, and documentation, making it even easier to integrate cloud services into an app’s development workflow.

Full Transcript

# APIs vs SDKs: Streamlining Cloud App Development **Source:** [https://www.youtube.com/watch?v=kG-fLp9BTRo](https://www.youtube.com/watch?v=kG-fLp9BTRo) **Duration:** 00:09:20 ## Summary - An API (Application Programming Interface) acts as a standardized bridge that lets apps or services communicate, abstracting away complex internal logic so developers only need to request the data they need. - In the example of a veterinary clinic mobile app, the app would use a cloud‑based visual‑recognition API to POST an image of a pet and receive the pet’s name and file information. - REST is the most common API style highlighted, using HTTP methods (POST, GET, PUT, DELETE) together with optional parameters to structure requests and responses. - APIs are defined by industry standards such as SOAP, GraphQL, and especially REST, which ensures consistency and interoperability across different systems. - SDKs (Software Development Kits) bundle these APIs with code libraries, tools, and documentation, making it even easier to integrate cloud services into an app’s development workflow. ## Sections - [00:00:00](https://www.youtube.com/watch?v=kG-fLp9BTRo&t=0s) **APIs and SDKs Explained** - Nathan Hekman explains the difference between APIs and SDKs and how they enable communication between a mobile app and cloud services, using a veterinary clinic photo‑recognition example. - [00:03:17](https://www.youtube.com/watch?v=kG-fLp9BTRo&t=197s) **Building Blocks of API Requests** - The speaker outlines the essential elements of a REST API call—HTTP method, optional parameters, and endpoint URL—and describes a typical JSON response from a visual recognition service. - [00:06:21](https://www.youtube.com/watch?v=kG-fLp9BTRo&t=381s) **SDK Toolbox for Simplified API Calls** - The speaker explains that language‑specific SDKs act as ready‑made toolkits that wrap API requests into simple methods—illustrated by a Java SDK call in a mobile app that sends an image to a visual recognition service and returns a native response object. ## Full Transcript
0:00What's an API? 0:01What's an SDK? 0:03And how are the two related? 0:05How can APIs and SDKs help streamline my cloud app development workflows? 0:11I'm Nathan Hekman from IBM Cloud 0:13and before I jump in and answer that for you, 0:15please hit that subscribe button. 0:18Alright, let's get started with an example. 0:21Let's say you're developing a mobile app for a veterinarian clinic, 0:25and the idea is for this mobile app to actually 0:30allow a receptionist to take a picture of a pet as it enters the clinic 0:34and the app will communicate with a visual recognition service 0:40that's running on the cloud. 0:44And the idea is for the service to return the pet's name and bring up their file. 0:51So, how do we do this? How do we communicate  between the mobile app and this cloud-based  service? 0:57Well, that's where APIs and SDKs come in. 1:00Let's get started by talking about APIs, 1:07and we'll actually be comparing the two. 1:11So, first of all, APIs are all about communication. 1:18So, there are a set of definitions and protocols 1:21for apps or services to talk to other apps or services. 1:26So, you can kind of think of them like a bridge between your app 1:30and, say, this cloud-based visual recognition service. 1:34So, what does "API" stand for anyway? 1:37Well, it's Application Programming interface - A.P.I. 1:46And what are some of the aspects of APIs that make them useful? 1:52Well, like I said they're they're all about communication. 1:59So, communicating between a service and another service, an app and another app, 2:05it's it's how they talk to each other. 2:09Next, they're all about abstraction. 2:14What does "abstraction" mean? 2:16So, inside the VR service, up in the cloud, 2:19there's probably potentially thousands of lines of code running up there,  right? 2:24And you as a developer of a mobile app you don't want to have to worry about, 2:27"OK, which method in this service do I call to get the pet's name?" 2:33You don't want to have to worry about that. 2:34So, what an API does is it abstracts away all that complicated logic 2:38so you just have to worry about getting just the  data you need. 2:43It simplifies the process. 2:46And third, APIs are standardized. 2:52Meaning, there's industry-defined standards  for how to define an API 2:58and there's a few formats that are popular for APIs. 3:02You may have heard of SOAP, GraphQL, or REST, 3:08- which, fun fact, stands for "Representational State  Transfer", 3:13and that's what we'll focus on for this video. 3:17So, what are some of the building blocks of APIs? 3:20First of all, to actually send data, or send what's called a "request" 3:33from the mobile app to the VR service on the cloud 3:36you need to have a few different pieces. 3:40So, for a REST API call request you need to have 3:49what's called an operation. 3:53So this is this could be HTTP methods like POST, PUT, GET, DELETE. 3:59In this case it would be a POST method 4:03because you're sending a request over to the service 4:06which might include something like maybe the file name 4:09of the image you took of the pet. 4:14Next, would be parameters, this is optional. 4:19So, this, in this case, might be the file name of the image you took. 4:25So maybe cat.jpeg - if it's a cat that you took a picture of. 4:33And finally, would be the endpoint. 4:42So, that's the URL, basically, 4:45of the visual recognition service that you're trying to talk to. 4:48So, maybe that's, you know, it's some URL-slash-analyze. 4:55Great, so that's your request, right? 4:59So, this is what makes up a request. 5:03How about a response? 5:05What might a REST API response call that you receive back 5:10from the visual recognition service look like? 5:16Typically it's it's some form of raw data, maybe JSON. 5:20So, a request might look something like, 5:23or sorry, a RESPONSE, might look something like this. 5:27So, you have sort of this this data object that might include 5:31you know, the result, the type which is a cat, 5:34and maybe the name - 5:36which, in this case may be "Mittens" just walked into the  clinic. 5:40Great, so that's sort of the building blocks of what an API is. 5:45As a developer though, how do you actually call an API in your code? 5:51You don't want to have to worry about 5:53setting up your request with all these building blocks of operations, parameters, endpoints, 5:57and dealing with raw JSON objects, right? 6:00So that's where SDKs come in and really shine. 6:06So, let's talk about SDKs, what does that stand for? 6:11Well it is Software Development Kit, S.D.K. 6:19Pretty straightforward, right? 6:21So, SDKs, you can really think of like a toolbox 6:26of tools, or code that actually call APIs for you. 6:32Pretty cool, right? 6:35So, you may be specialized in one programming language over the other, 6:38you know, there's SDKs in a variety of languages. 6:41So, there's maybe an SDK in Java, in Node, 6:50maybe Go, 6:54or Python - 6:57whichever language that is your specialty there's probably an SDK for you. 7:03Perfect. So, back to our example over here, 7:07what might an SDK look like in this example? 7:12So, with an SDK, let's let's go ahead and put our little SDK toolbox 7:17within the mobile app 7:20and, for this case, since it's a mobile app, 7:23say, we'll use the Java SDK. Great! 7:27So, in this Java SDK, 7:29rather than having to configure 7:31your request manually with all these building blocks, you might actually call 7:35just a method, that's maybe called, I don't know, "Get Result", 7:39that will actually call these various building blocks - 7:45the operation, the parameters, 7:48and the request for you, 7:53it'll make it for you and it'll make that API request for you with code. 7:58In response, you'll get a response but it won't be necessarily a JSON object, 8:05it might be some code, 8:09maybe a native model object in Java called an "Analyze Response Object". 8:14So, the code might look something like this. 8:16So, you have an Analyze Response Object 8:19that you call the "Visual Recognition Analyze and Get Results" method. 8:24You pass in a parameter, which is "cat.jpg", which is the name of the file 8:28that you sent over the visual recognition service 8:31and, in response, you can actually go ahead and set 8:34a label in your mobile app to be "Mittens". 8:38So, that's the data you received in the form of an analyze response model object in Java, 8:44via your SDK, and you're able to see Mittens has entered the building. 8:49So, hopefully, this kind of summarizes what's an API, what's an SDK, 8:54what are both used for, 8:57and how they are truly fundamental tools in your cloud app development toolbox. 9:03Thank you. 9:04If you have questions, please drop us a line below. 9:07If you want to see more videos like this in the future, please "like" and subscribe. 9:11And don't forget, you can grow your skills and earn a badge with IBM CloudLabs, 9:16which are free browser-based interactive Kubernetes labs.