Why do the terms API and an SDK seem to be used interchangeably? - terminology

What is the accepted definition of an API compared to the definition of an SDK? Both seem to be used interchangeably, so I'd imagine that some libraries dubbed APIs are in reality SDKs, and vice versa. Also, is there a reason for this distinction?
Thanks!

An API, or application programming interface, defines a set of classes, functions, and structures to be used by an application to make use of some library or subsystem. For example, both the windows multimedia subsystem, and windows sockets subsystem both have their own API. An API is not a concrete entity, you can't point at a file and say that the file itself is an API. An API is merely a specification for a communications protocol that a program needs to use to make use of a library or subsystem.
An SDK, or software development kit, contains tools, documentation, and needed files, to program against 1 or more APIs. Some SDKs, but by no means all, may contain sample code to demonstrate how an API can be used. 2 examples of an SDK are the Windows Platform SDK and the .NET Framework SDK.
The most likely reason the terms are used interchangeably is because sometimes an SDK only has the tools, documentation, and files for a single API, and both the API and SDK share the same name. An example of this would be the SDK for developing winamp plugins.

API - Application Programming Interface. This is what you write code to.
SDK - Software Development Kit. These are the libraries that you need so you can code. An SDK likely has many different api's contained in it.

None of the answers I've seen so far really capture it clearly and completely.
The two terms are not interchangeable and if someone uses them interchangeably, it indicates a lack of understanding or preciseness.
API - Application Programming Interface. Exposed by a class library. Utilized by an application. When you build an application that uses the library, this is the interface your code uses to connect to or call into the library. In other words the set of rules and conventions applications must follow to use the library. The API includes the classes, their methods, the parameter lists for the methods, and other supporting elements (like enumerations, constants and so on). An API is an abstract artifact: You cannot download an API, or install an API. You can describe an API, and you can use one. The library itself is the concrete realization of the API, the delivery mechanism.
SDK - Software Development Kit. This is a concrete thing. You can download an SDK, install it, store it. An SDK includes:
libraries, which, as you know, expose or provide APIs.
header files (if applicable)
documentation - readme files, help files, release notes, reference documentation, programming guides. Realized as .CHM files, pdf documents, etc.
tools - such as compilers, assemblers, linkers, profilers, debuggers, optmizers, test tools, and more.
sample code and sample apps - showing how to use the API
maybe some other stuff that doesn't fit into one of the above categories
A Concrete Example:
the Java SDK is a downloadable, versioned thing. It delivers libraries, tools (on windows: javac.exe, java.exe, jar.exe, etc), all the help files and API doc, and source code for the libraries.
the API for Java is the set of rules your code must follow to invoke the libraries; these rules are described in the API documentation.

An API is an Application Programming Interface -- its something your program can talk to. An SDK usually includes an API along with documentation for the API. An API is not required to contain documentation. An SDK may include the API Components, but will always include the documentation.

APIs can exist within SDKs but not vice versa. SDKs generally contain a complete specifiction of a framework or environment. For example the Java SDK contains a full specification of the Java language plus tools, external libraries and whatever else the vendor decides to throw in there. The java apis are simply the interface to those specifications.

Related

Can I make calls to APIs such as youtube-dl and ffmpeg from a chrome-app?

First of all, I haven't started the implementation of the system I'm about to describe, as I didn't want to commit on implementing something I did not know if was possible.
So, what I'm trying to achieve is to build a chrome-app to download the audio from certain websites (e.g. youtube and soundcloud) using youtube-dl, post process it using ffmpeg and then upload it to a cloud service via some api. The reason I want to do it via a chrome-app is because I could do all the work on the client side (no need for servers) and I'd have the ability to insert javascript into the pages using content scripts, which would make the app pretty simple to use (I could create buttons such as 'download song' and stuff like that).
Although I have already read the documentation explaining the NaCl Technical Overview and some of the Application Structure, I still am not sure as to whether I would be able to make these calls via some C/C++ module or if I would get denied due to security reasons.
To summarize: considering that the user has the needed dependencies in his system (youtube-dl, python, ffmpeg and etc.), is it possible to make calls to third party APIs such as the ones described before via a chrome-app using NaCl ?
Thank you all in advance,
Chrome apps are normally sandboxed.
Less so than extensions - they can reach much more system resources via app APIs.
But still, what you mention is executing libraries / utilities out of browser, and it's not normally allowed.
(P)NaCl is tightly sandboxed in this regard. See this old question, it still applies: you can only use 3rd-party code that compiles into NaCl along with your app, not just link to a library. There are some library ports to NaCl, but it's not automatic.
Normally, a few years back you would use a mechanism like NPAPI to reach out and use a library out of browser. It's deprecated, and won't work anymore. In its place, Chrome offers a pipe-like (through stdio) connection to an external program called Native Messaging. You could use it to perform operations with system-level libraries and tools, but the downside is that you can't bundle the native host with your app, you'll need a separate installer.

How do you use existing C libraries with the Chrome Native Client?

I'm new to Chrome Application development and the Native Client/PNaCL pipeline. I'm a bit confused over the process of using existing C code/libraries in a chrome application. The FAQs and NaCL official docs suggest that using existing code is easy, and one of the advantages of developing Chrome applications.
However, there is also mention of nacl-ports, an official list of ported C libraries to be used in Native Client apps.
If I have some random C library I've used, what is the process for actually using it in my Chrome application? This question feels silly, but I'm quite confused over the process. Do I have to recompile the source with a NaCL compiler? Where in the SDK can I find this?
The FAQ also mentions that things like forks, file i/o is not allowed in the library, so I will have to rewrite any code that does these things, is that correct?
Bottomline: I have an existing C library. What is the process for using it correctly, and making calls to it, in a Chrome application?
The short answer is that you'll have to recompile your library with a NaCl C compiler.
You may want to take a look at naclports: this repository contains ports of many common C libraries to Native Client. You can browse the source more easily here.
As for File I/O, we often suggest using the nacl_io library when porting existing code. This provides a POSIX interface (e.g. fopen/fclose/fread, etc.) Many ported libraries require no modifications when using nacl_io.

Choosing/Learning new Type Libraries to reference in VBA

I have done a fair bit of Automation programming using Access to drive the operations of other Office programs. This has been straightforward because the references needed are specific Microsoft programs and I get help learning the type libraries from the Developer Reference Help pages and exploring the classes, methods, and properties in the object browser.
I've also used type libraries from Lotus Notes and Adobe Acrobat to integrate specific functions of those programs, but I needed to use SDKs to understand those objects and methods.
Now I'm looking to automate a web browser control in future projects. I can find specific code samples if I search very specific topics, like [vba] http post web form, but what I'm really looking for is a higher-level review of type libraries and active-X controls. I've found snippets of code using SHDocVw and MSHTML, but I am looking for some guidance on which type libraries to use in this area and how to explore other possibilities.
I have used the Web Browser control in Access 2010, which I believe uses the Microsoft Internet controls reference.
Please see the following screenshot for more information. Note the code changes the zoom of the Web Browser so that an image zooms to fit.
http://screencast.com/t/WsqWTlZRnh
The documentation I found referring to the object used is at the following location:
http://msdn.microsoft.com/en-us/library/aa752127(v=vs.85).aspx
Good look…

Web service API for DRMAA on SGE

Does anyone know of any project to expose the DRMAA API (job scheduling and maintenance API) from SGE (Sun Grid Engine) as a web service API? A RESTful API would be best.
I do not think there are any web service API for SGE. I found drmaa-python pretty easy implementing in python script that can be called from server side scripts like PHP.
There is nothing like this available at the moment, but:
The Open Grid Forum started a new standardization activity to define how DRMAAv2 can be exposed as RESTful API. The specification draft is publicly available.
Since more and more people ask for such a remote interface, implementations might be available pretty soon. They are most likely to be announced by the OGF OCCI working group, so follow them if you are still interested.
Mapping such an implementation to the DRMAAv1 library in GridEngine should be relatively straightforward.

Framework for Mapserver GIS APP

I'm trying to display on the web (read as create a GIS Web app) topo data layers stored in a POSTGIS/POSTGRES spatial database using mapserver. My problem is, although i happened to come across different gis frameworks that I could use, my lack of experience on using mapserver in the first place makes me indecisive of which framework to use. So what is the easiest framework out there to use? I'm using a MS4W pre-packaged mapserver binaries, and i've installed almost all of the additional packages (frameworks) from their site.
Thanks for the help!:) I
Mapfish (I think python and C based and ideal with mapserver)
GeoServer (java based)
Featureserver (RESTful, light and effective)
Other interesting links:
GEOEXT provides an excellent extension for openlayers
Boston GIS provides excellent tutorials so does Paul Ramsey and Chris Schmidt
The mother GIS - Free Open Source Software OSGEO
FreeGIS - Continually updated list of free and related GIS software
I've used Geoserver and Feature server on multiple occasions, and never got deep into mapserver. I know that Mapserver has a big community and they love helping out, check them out on IRC and their mailing list.
We have developed an interface called OWGIS for displaying GIS data.
Website: http://www.owgis.org
Description:
The OWGIS (Open WebGIS) is an OpenSource Java Servlets web application that creates WebGIS sites by automatically writing HTML and JavaScript code. The WebGIS sites are configured by XML files that define which layers will be displayed on the maps as well as the texts to be used on the interface. OWGIS's most notable features include animations, veritcal profiles and vertical transects, various color palettes, dynamic maps, downloadable data, and multilingual interfaces. All these features are created automatically without any additional web programming.
Since you already got MS4W installed. The easiest way to publish a map service from Postgres is from MapServer which is component of the ms4w.
To start publish wms from MapServer,
1) Read thru the documentation of Mapfile which is the service definition file of how the WMS configured.
2) Read the ogr postgis connection documentation. You would be able to write the database connection follow the instruction pretty easily.
3) Once you got the valid Mapfile with correct postgis connection string info, you are able to publish the WMS for your topos.
MapServer is very powerful and easy to use. The file based service provide a lot of flexibility which is critical when you need publish something dynamically.
GeoServer is very popular too and has a gui which is extremely easy to use, by several click and your services are ready to go.
Other solutions are also available as well. But consider the community user base and tech support. I would recommend using MapServer or Geoserver for your case. We had our Mapserver holding USGS topo services as well, which is very stable,flexible and salable so just some FYI.
Hope it is helpful.