Pergunta

Eu estou tentando explicar a um não-desenvolvedor a diferença entre uma API um SDK. Preciso explicar por que um fornecedor de software de impressão digital comercial provavelmente não irá fornecer um SDK, embora possam certamente ter um usado.

Tanto o dispositivo de fornecedores e fabricantes de software podem e devem expor uma API bem definida. Esta API permite que outros programas de software para (ser gravados) inter-operar com os próprios componentes de software do fornecedor ou dispositivos de hardware.

Se alguém tem mais idéias para explicar isso claramente, eu gostaria muito que as sugestões. Eu quero enfatizar que o objetivo é explicar os conceitos para um não-programador que não sabe desenvolvedor linguagem .

Especificamente, no contexto de um sensor de impressão digital contra software para fazer a inscrição / verificação, aqui está como eu tentou explicá-lo:

Se eu sou um dispositivo de impressão digital / sensor fabricante e não no negócio de escrever software, as maneiras que eu poderia melhor comercializar o meu produto são:

  1. Certifique-se de meus drivers de dispositivo podem ser instalados em uma ampla variedade de sistemas operacionais
  2. Definir e fornecer uma API para desenvolvedores de software para escrever programas (por exemplo, para a matrícula, verificação) para “falar” ou usar o meu dispositivo
  3. Desenvolver e fornecer um SDK (um passo além de uma API) para tornar mais fácil e mais rápido para desenvolvedores de software para escrever programas que o trabalho com o meu dispositivo. SDK podem proporcionar bibliotecas de código auxiliar, referência aplicações, documentação etc.
Foi útil?

Solução

Piece of cake:

  • an API is an interface. It's like the specification of the telephone system or the electrical wiring in your house. Anything* can use it as long as it knows how to interface. You can even buy off-the-shelf software to use a particular API, just as you can buy off the shelf telephone equipment or devices that plug into the AC wiring in your house.
  • an SDK is implementation tooling. It's like a kit that allows** you to build something custom to hook up to the telephone system or electrical wiring.

*Anything can use an API. Some APIs have security provisions to require license keys, authentication, etc. which may prohibit complete use of the API in particular instances, but that's only because particular authentication/authorization steps fail. Any software that presents the right credentials (if required) can use the API.

**Technically, if an API is well-documented, you don't need an SDK to build your own software to use the API. But having an SDK generally makes the process much easier.

Outras dicas

API is like the building blocks of some puzzling game that a child plays with to join blocks in different shapes and build something they can think of.

SDK, on the other hand, is a proper workshop where all of the development tools are available, rather than pre-shaped building blocks. In a workshop you have the actual tools and you are not limited to blocks, and can therefore make your own blocks, or can create something without any blocks to begin with.

coding without an SDK or API is like making everything from scratch without a workshop - you have to even make your own tools

Suppose company C offers product P and P involves software in some way. Then C can offer a library/set of libraries to software developers that drive P's software systems.

That library/libraries are an SDK. It is part of the systems of P. It is a kit for software developers to use in order to modify, configure, fix, improve, etc the software piece of P.

If C wants to offer P's functionality to other companies/systems, it does so with an API.

This is an interface to P. A way for external systems to interact with P.

If you think in terms of implementation, they will seem quite similar. Especially now that the internet has become like one large distributed operating system.

In purpose, though, they are actually quite distinct.

You build something with an SDK and you use or consume something with an API.

Application Programming Interface is a set of routines/data structures/classes which specifies a way to interact with the target platform/software like OS X, Android, project management application, virtualization software etc.

While Software Development Kit is a wrapper around API/s that makes the job easy for developers.

For example, Android SDK facilitates developers to interact with the Android platform as a whole while the platform itself is built by composite software components communicating via APIs.

Also, sometimes SDKs are built to facilitate development in a specific programming language. For example, Selenium web driver (built in Java) provides APIs to drive any browser natively, while capybara can be considered an an SDK that facilitates Ruby developers to use Selenium web driver. However, Selenium web driver is also an SDK by itself as it combines interaction with various native browser drivers into one package.

I'm not sure there's any official definition of these two terms. I understand an API to be a set of documented programmable libraries and supporting source such as headers or IDL files. SDKs usually contain APIs but often often add compilers, tools, and samples to the mix.

API is specifications on how to do something, an interface, such as "The railroad tracks are four feet apart, and the metal bar is 1 inch wide" Now that you have the API you can now build a train that will fit on those railroad tracks if you want to go anywhere. API is just information on how to build your code, it doesn't do anything.

SDK is some package of actual tools that already worried about the specifications. "Here's a train, some coal, and a maintenance man. Use it to go from place to place" With the SDK you don't worry about specifics. An SDK is actual code, it can be used by itself to do something, but of course, the train won't start up spontaneously, you still have to get a conductor to control the train.

SDKs also have their own APIs. "If you want to power the train put coal in it", "Pull the blue lever to move the train.", "If the train starts acting funny, call the maintenance man" etc.

API = Dictionary of available words and their meanings (and the required grammar to combine them)

SDK = A Word processing system… for 2 year old babies… that writes right from ideas

Although you COULD go to school and become a master in your language after a few years, using the SDK will help you write whole meaningful sentences in no time (Forgiving the fact that, in this example, as a baby you haven't even gotten to learn any other language for at least to learn to use the SDK.)

How about... It's like if you wanted to install a home theatre system in your house. Using an API is like getting all the wires, screws, bits, and pieces. The possibilities are endless (constrained only by the pieces you receive), but sometimes overwhelming. An SDK is like getting a kit. You still have to put it together, but it's more like getting pre-cut pieces and instructions for an IKEA bookshelf than a box of screws.

You use an SDK to access functionality of a library, and an API to control it.

API = Application Programming Interface SDK = Software Development Kit

An SDK seems to be a complete set of APIs that allow you to perform most any action you would need to for creating applications. In addition an SDK may include other tools for developing for the platform/item that it is for.

An API on the other hand is just a series of related methods that may be good for a specific purpose.

As an example, the JDK (Java Development Kit) contains the API as well as the compilers, runtimes, and other miscellaneous tools. The Java API is simply all the libraries that make up the core language that you can work with out of the box.

Examples of APIs: Java API, Google Maps API, Flash Player API.

Examples of SDKs: JDK, GWT, Flex SDK.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top