Websites vs Webservices
I was trying to put the difference between websites and web services (irrespective of RPC based or RESTful) development in words. Am I right is saying when a client is another software (assuming browser is just a tool for the original c开发者_如何学JAVAlient) and producer is responding in XML (assuming this is the standard for data transportation) comes under web services (programmable web) otherwise its a website for humans?
Thanks
-Abidi
Yes. One could further precise that bots and crawlers are a secondary phenomenon where software attempts to mimic human behaviour. So that your high level distinction still stands.
The huge difference is that web sites have a double role
- provide information
- present information
Whereas for web services, there is no concept of presentation. You will find this same distinction in their respective expression languages: whereas HTML cumulates both information tagging and presentation directives, xml is only about information identification, organisation, transformation and organisation.
Historically XML followed in the wake of HTML when people figured out that there were better ways to access information exposed by web sites than just ripping their not well formed html pages more or less aping humans; whilst at the same time everybody knew that neither CORBA nor RPC could fill the need for B2B communication because of their unability to be routed through a WAN.
Hence then, SOAP, all the OASIS standards and only later REST services, still preferred for devices too 'light' to accommodate full fledged SOAP stacks.
Something like that. Of course the client calling the "web service" may be the browser itself. I'd say that the difference is that a web site returns content that is meant to be consumed by human beings while a web service returns content meant to be consumed by another program. In the latter case it doesn't have to be encoded as XML; it can be anything. It's tough to make a good distinction between "web site" and "web service" on the basis of the type of content returned, because there is plenty of content that can be consumed equally well by a human being and a program. A service might return a PDF of a customer statement, for example, and could be used directly by the customer and also by a bill-printing program.
Maybe a better definition is to say that a "web site" is a collection of "web services," some of which may return HTML pages and some of which may return other types of data.
精彩评论