Web-server – Can someone explain the difference between app server/web server/web services

application-serverweb servicesweb-server

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

Best Answer

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.