Can someone explain the difference between app server/web server/web services?

I know that with web server, the html pages are transfered from server to client, with web services, a xml file is sent, but still ... I don't understand them; not even the difference between them.

Can someone explain as simple as possible this terms ?

Platform: java,python,php

Thank you


A web server is something that serves you contents using the HTTP(S) protocol; it receives requests in the form "give me http://some.site.com/some/page?some=parameter" and sends back an answer that can be an HTML page or anything else that can be transferred over HTTP(S); that is, pretty much anything (see MIME for details).

More often than not, web pages will not be only static text files, but will be generated on-the-fly by the server using some server-side code developed by programmers; when a web site (or part of it) gets complex enough, it's common to define it as a "web application"; the term is very vague, and actually means "a web site with a dynamic-generated content". Sometimes, the web server and the application server are actually the same program (see IIS, or Apache with modules); other times, the application server is a full-blown different program (maybe even running on a different machine), which communicates with the web server to feed it dynamic contents while the web server manages HTTP requests and static contents; this is the standard practice for Java web sites.

A web service is a web application which follows some standards defined for exchanging requests and responses using XML; the idea here is that the web service is not going to be used by humans, but will be called by other programs (possibly being web applications themselves) and so it doesn't need to do fancy graphics or anything else, but just to provide the requested informations in a standardized way.


There is no really precise definition of these terms, but very roughly speaking:

  • a web server is a program that serves content (HTML, images, etc) to browsers, i.e. to be read by humans
  • a web service is a service that can be accessed via HTTP (the same protocol a web server uses), typically an API to be used by programs

So the difference is the "audience": a web server serves pages for people to read in a browser; a web service provides data to some program (which may itself be a web server ;-)).

To make the confusion complete, most web servers (the program) can be used to implement a web service (as the technical basis is the same). So it's not really a technical distinction, but one of which purpose the server has.