SDK versus API.

homercles337

Diamond Member
Dec 29, 2004
6,340
3
71
Go easy on me im not a software developer although a small part of past (MUCH more so in grad school than the last 4 years) and current duties did/do require using various APIs (win32) and SDKs (Kodak and others). However i have to admit that im embarrased that i cant argue benefits/costs of each. I believe i have an understanding of the basic differences but hearing it from another, more knowledgable person would be nice--plus all the minor differences would be even better. TIA.

Homer.

edit: BTW, i use borland builder ide for all my stuff.
 

xtknight

Elite Member
Oct 15, 2004
12,974
0
71
Sorry, I don't understand the question.

An API is an application programming interface, which contains functions pertaining to the system in question.
An SDK is a software development kit, containing definitions for the API and usually documentation/sample applications.

Neither have to cost anything, and neither is "better" because they refer to two different things.

Are you asking whether to build from the ground-up or to use foundation classes created by Kodak/etc? Depends...I have no idea what you're trying to do. Photo processing operations?
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
In addition to APIs and SDKs to used those APIs, there are also "components" and "frameworks."

A framework allows writing code in a higher level of abstraction than at the raw API level. For example, for Windows C++ coding there is MFC which wraps the C Win32 API in C++ classes with a framework for cleaner message handling.

A component, component library, or library can be written to be used with a raw API, or on top of SDK code, or as part of a framework like MFC. A component usually offers specialized functions like Zip archiving, text editing or image manipulation.

These are all just different tools. A hammer isn't "better" than pliers.

A framework or component might save a lot of time if it satisfies some need, but only if it works the way you need it to, costs less than the time to develop it in-house, and (for commercial development) has an acceptable license.

Cost-benefit is just that and varies by situation.

Cost includes purchase price, royalty or redistribution costs (if any), time to learn to use it, time to work around limitations in their code, and (harder to quantify) lost revenue if there are limitations that can't be worked around, leaving you unable to deliver features.

Benefits include time saved, learning saved (for example how to do resampling of images), having large blocks of complex code already tested for you by other users of the component/library/SDK, and often being able to ask other users of the component for solutions to problems.
 

homercles337

Diamond Member
Dec 29, 2004
6,340
3
71
Thanks dave, that helps. To clarify for the other posters, imagine you purchase a large software package and you want to extend and develop tools that use that package (in this case its an image analysis application). If you wanted to write something in C++, R, Java, whatever to do this which would allow you more freedom? An API or an SDK? Basically, which one is more "open?" Would they be equivalent? It seems to me that the SDK would have more limitations, but may be easier to develop quickly. My experience contradicts the latter though since i have used SDKs that were nearly impossible to use.
 

clamum

Lifer
Feb 13, 2003
26,252
403
126
Originally posted by: homercles337
Thanks dave, that helps. To clarify for the other posters, imagine you purchase a large software package and you want to extend and develop tools that use that package (in this case its an image analysis application). If you wanted to write something in C++, R, Java, whatever to do this which would allow you more freedom? An API or an SDK? Basically, which one is more "open?" Would they be equivalent? It seems to me that the SDK would have more limitations, but may be easier to develop quickly. My experience contradicts the latter though since i have used SDKs that were nearly impossible to use.

I would think an SDK would allow for more customization and modification. I'm by no means any expert, but from my experience with SDKs and APIs, APIs are just function calls that you can use to build an application. The SDKs I have worked with contain a lot of the code for the application in question.

For example, the Quake 1 SDK contained a ton of source code for the game and people modified it and made a myriad of different mods from it. If they would've released an API, I would think it would just allow function calls from somewhere, not the ability to modify those function. Like I said, I'm no expert though.
 

Atheus

Diamond Member
Jun 7, 2005
7,313
2
0
Originally posted by: homercles337
If you wanted to write something in C++, R, Java, whatever to do this which would allow you more freedom? An API or an SDK? Basically, which one is more "open?" Would they be equivalent?

I think you might still be a bit confused... take the Java SDK as an example. It's an actual 'kit', something you download, which contains everything you need to develop software in java. It includes compilers, documentation, samples, and a bunch of code called the java API. The SDK would be pretty useless without the API, you would have to write a huge amount of code from scratch to do anything more complex than add two numbers together... you couldn't even write to the screen without effort.

To talk about using the SDK without the API, or the API without the rest of the SDK, is kinda pointless.
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
Having the source to a SDK makes a huge difference lin those examples, which seem more like components or libraries to me, but all 3 terms (SDK, component, library) are a bit squishy.

It sounds like you're ( homercles337 ) defining SDK as "component/library with source code" vs. API as "component/library as a closed binary object with fixed programming interface."

I've used both at work, and it can be very frustrating to deal with limitations in an "API" component. You can't alter behavior of the functions, either to add aditional features or to put in your own bugfixes.

For example, the CXImage library for Windows (see CodeProject.com) -does- have source, so you'd call it a SDK. As delivered it has metafile support, but no way to scale those metafiles before converting them into bitmap form. Since we had access to the source code I was able to add a scale factor to the class to be applied when a metafile is loaded. That would be impossible with a compiled component unless the feature was already built-in.