views:

95

answers:

5

what is the purpose of web services?

i mean isn't all web applications a web service ?

also why do people create API web services? is it to let developer's use the website's functions? kinda like facebook and youtube ?

is it possible to make a API for web service where you can use C++ or VB to use the functions? therefore, someone could make a desktop application based on your web application's API ?

how do you create a web service API and a web service ?

A: 

Normally a API is developed to create program that interact with the site, like the Twitter API, that you can use Twitter functions in a program.

Nathan Campos
A: 

A web service is a type of program running on a web server built especially for other programs to use, by submitting information requests to it in a particular format (usually some information wrapped in XML).

The API part (Application Programming Interface) is usually a class or set of classes that have the code that knows how to format the information to make requests from the Web Service - so that your program only needs to make the usual function calls to the API classes.

It simplifies your use of the web service.

Here is an example of how to make one, and use it for .NET languages: http://www.codeproject.com/KB/XML/BeginnerWebService.aspx

Any program that uses the web for its interface is a web application, like this site or Facebook.

An Application Service Provider is a company that helps you write web apps (http://en.wikipedia.org/wiki/Application%5Fservice%5Fprovider) or provide other services.

Ron

Ron Savage
than what actually is Web Application or Application Service Provider ? is the purpose of web service API, simply to make life easier for 3rd party developer's hoping to use your web application's unique functions ?
g2g23g
A: 

If you ever developed applications that rely on libraries or dlls in terms of windows programming. Think of a web service as a dll hosted on a web server that has a direct URL to it. So your application or website can read the data exposed from the URL that you can use as function calls.

Web services transmits data via xml, once the language you write your application in can read xml, you can write it to make calls to the web service, that is passing parameters and the function name to the service, then if expecting a return value, your application reads the data from xml.

Shawn Mclean
A: 

There are basically two different types of webservices, one that is SOAP-based and the other is REST-based.

Either can be accessed by desktop applications. I have written applications, such as screensavers, that will interact with the server through both of these types of webservices.

An API is useful so that people can write applications, as you mentioned, to use these services, as, without applications using them, these webservices are pretty useless.

A SOAP-based webservice is basically just a web application that sends and receives using an xml message format that follows a standard.

A REST-based webservice is the cgi-based application that is similar to using an html form element, generally using GET, but, if you are doing anything that can be destructive, or change databases, you will want to use POST.

You can write applications using these APIs in any language, which is the advantage, as you can then choose which language is best for the server-side, and that has no impact on what you do on the client-side.

How to create a webservice will depend on which of the two main types you want to create, and which language you choose to use.

James Black
A: 
OscarRyz