I'm confused by the terms. When I make an PHP application that
1) can be called with an URL or HTTPRequest, with paramete开发者_运维技巧rs (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"?
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.
It's a web service if it uses HTTP. And yes both submitting and publishing data are both things that web services do.
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
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.
Yup - just like a butler not only serves you the meal, he would also take your trash away.
精彩评论