tags:

views:

78

answers:

5

I'm confused by the terms. When I make an PHP application that

1) can be called with an URL or HTTPRequest, with parameters (i.e. country id), and returns data (XML or anything else)

2) can be called in order to store data (i.e. user wants to store all his contacts online on the server)

Is that still ok to call this thing a "Web Service", and the whole activity ranging from fetching data and submitting data a "Web Service Call"?

+2  A: 

That's absolutely a Web Service.

If you can think of your web service methods as analogous to API calls, you can call it a Web Service; cf. obligatory Wikipedia reference.

Don
yes, and if you are doing REST web services, normally you would use a POST to submit the data. example: http://stackoverflow.com/questions/2062053/passing-complex-objects-into-a-wcf-rest-service/2062143#2062143
Cheeso
A: 

Yes, that's normal enough terminology. A service is a process that "does something." And that "something" can be anything that either takes input, provides output, or both.

  • returnLibraryBook("Joel on Software") - takes input, modifies database
  • getCheckedOutBooks() - provides output; a list of books currently checked out
  • locateNearestStarbucks("90210") - takes input, provides output

In essence Web Services amount to remote method calls across the HTTP protocol.

dustmachine
+1  A: 

It's a web service if it uses HTTP. And yes both submitting and publishing data are both things that web services do.

Dean Povey
Just curious for crowd opinions: What if it doesn't use HTTP? Say, if it were CORBA or Java RMI? Would you call that only a "federate" instead of a "web service"? Are the two mutually exclusive?
Matt
Those are remote procedure calls, but the call over HTTP is what makes it "web".
Don
A: 

yap, just like a butler not only serves you the meal, he would also take your trash away :->

herzmeister der welten
+1  A: 

I like this definition of web service.

Web-services: functions that you can call over the Internet 1

If you can update the database in regular functions then no problem doing so with WS.


1: Quote from Web-Services Demystified

medopal