A web server is a computer system that processes requests via HTTP to distribute information on the Web
The term can refer to the entire system or the software
A static web server serves hosted files to the client
A dynamic web server consists of a static web server with extra software (commonly an application server and a database) that generates content for each client request
A web service is a service offered by an electronic device to another electronic device where the devices communicate over the Web.
Web services are intended for machine-to-machine communication and exchange data in machine readable formats such as XML or JSON.
There are two major categories of web services:
REST-compliant web services: manipulate representations of web resources using a uniform set of stateless operations.
Arbitrary web services: expose an arbitrary set of operations.
A traditional web service describes a standardized way of integrating web-based applications using the XML, SOAP, WSDL, and UDDI open standards.
XML: the data exchange format
SOAP: transfers the data
WSDL: describes the services available
UDDI: lists the available services
More modern REST-compliant web services expose resources as URLs and perform stateless operations on the resources using HTTP verbs.
Web 2.0 refers to websites that emphasize:
user-generated content
usability
interoperability
Examples of Web 2.0
Social networking sites
Blogs
Wikis
Video sharing sites
Mashups
Web 2.0 applications often utilize web services for their functionality
A web API is an application programming interface (API) for either a web server or a web browser.
A server-side web API is a programmatic interface exposing endpoints via the web to a defined request-response message system.
A client-side API is a programmatic interface to extend the functionality within a web browser.
Many Web 2.0 applications have moved away from SOAP-based web services towards collections of RESTful web resources.
RESTful web APIs are accessible via standard HTTP methods.
RESTful web APIs tend to be less resource intensive when JSON is used as the data exchange format.