tags:

views:

176

answers:

5

I have never worked with APIs before (and have very little programming experience outside of HTML and CSS) and I am struggling to find any clear tutorials or explanations.

Do APIs all work in the same way? Can you use any programming language or only a specific language or does that depend on the API? Is there a common way to work with some of the major APIs? Do you know of any really basic API tutorials or do you really need to be au fait with particular coding languages before you start down that road?

There is no specific API that I "need" to work on but I would be interested to have a play with services such as Twitter, Flickr, Google Maps, Facebook, Last.fm, etc. if it's accessible.

Any advice would be much appreciated thanks,

Luke

+4  A: 

An API is an Application Programming Interface. This is really a generic term for a lot of different sort of things. I'm assuming you mean "Web APIs" which are usually RESTful or SOAP based. The sort of API that is used really differs from one service to another. Some have multiple ways of working with the API, like Amazon has REST based and SOAP based services.

The best way to get started if you are doing this from the client side, is to really start learning Javascript and then learn JQuery. Then from there choose a service you'd like to program to. You could learn a lot of Javascript by coding for the Google Maps API. This is probably the best place to start as it is a pretty neat system, not too difficult, requires you to have a good level of knowledge of Javascript (which you can learn along the way).

This is just my $0.02.

BobbyShaftoe
+1  A: 

I would suggest you learn a programming language before you get too involved in APIs. Once you understand how those work, APIs will make a lot more sense

akatakritos
A: 

Woah I've heard this before. You dont want to rush into learning APIs, you need to get aquainted with a nice little programming language first. Once you have a little bit of programming skill the mystery of API will be revealed. Maybe give Ruby or Python a look as I've seen many people get started using those.

http://wiki.python.org/moin/BeginnersGuide

Oh and if you have a Mac or Linux based machine the best part is you probably already have Python installed!

Rob Ottaway
There's really not anything wrong with beginning with Javascript. Especially if they are already comfortable with HTML/CSS.
BobbyShaftoe
A: 

API's aren't all that sophisticated. The word takes on mystical proportions.

Let's take a look at a specific API. For example, Twitter. Google Twitter API. First of the results is http://apiwiki.twitter.com/

You can find some Twitter API implementations in Python: http://apiwiki.twitter.com/Libraries#Python

Get Python. Get the API implementation. Start hacking.

S.Lott
A: 

In his excellent book, Practical API Design: Confessions of a Java Framework Architect, Jaroslav Tulach makes a convincing argument that the API of a system really consists of all the things (function signatures, exposed objects, configuration file formats, etc.) that you have to know in order to use a piece of software.

To your specific questions, there are no universal standards for how APIs should be designed; styles and practices vary wildly between programming languages, language communities, organizations, etc.

To get started, find some library in Your Favorite Language, and look for code samples that show how to exercise all its capabilities. Then try playing with those samples to vary their behavior.

joel.neely