Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I am trying to understand the concept of using 3rd party web API. From what I understand so far, web API look like regular URLs with some parameters etc. Will the client program need to download and install any package/bundle etc from the website/server etc providing APIs and include it with their product or no bundle is needed to download from service provider. the client program just uses the web API URLs (like how we do it in browser)

What are the variants in common use?

Does it boil down to how much we want to do on client side and how much we want to do on server side? like not downloading anything from web API service provider means everything happens on web API provider side..

share|improve this question
1  
Hi p2pnode, you should lookup REST and SOAP to get some insight. REST has become more popular than SOAP, it's more lightweight and easier to use. –  Falcon Sep 17 '11 at 14:33
    
Some insights into these top level questions will be really helpful before I get lost in details.. –  xyz Sep 17 '11 at 14:41
add comment

2 Answers

up vote 2 down vote accepted

Will the client program need to download and install any package/bundle etc from the website/server etc providing APIs and include it with their product or no bundle is needed to download from service provider.

It depends. Generally, when you use a webservice, you make a request and you get a response. How you handle that is your choice. You needn't necessarily download anything but the responses from the service.

Most of the times, though, you want to generate an interface to the webservices which handles the communication part for your client, so you needn't write it yourself. You mostly do so by downloading WSDL files for the service which can be used to generate such a client interface. This client does not contain any logic of the WebAPI, it's purpose is to let you to call the logic on the serverside. The generation of such a client interface is just for your convenience, so you don't have to parse the responses or deal with the underlying protocol.

What are the variants in common use?

SOAP and REST with responses in JSON or XML are the most common forms of such services.

Does it boil down to how much we want to do on client side and how much we want to do on server side? like not downloading anything from web API service provider means everything happens on web API provider side..

Well, I don't know how to answer that part of your question as I don't understand it. When you make a call to a WebAPI, the request is processed on the server and a response is sent back to you. Even if you generate client stubs from WSDL, this just provides an interface and handles communication for you. There's no domain logic clientside in such a case.

share|improve this answer
add comment

A web API (Application Programming Interface) is typically a defined set of HTTP request messages along with a definition of the structure of response messages, typically expressed in JSON or XML. You can consider Web API as a Web service but they have moved from SOAP to REST.

For further information you can visit this wiki LINK for REST. If you want to easily understand what Web API, think of facebook API, they allow anyone to connect with the facebook and use its services and database for their own use.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.