- [Instructor] So as we've discussed, a web server would
normally have a front-end web server
and a back-end database server.
Sometimes, this is all part of the same machine.
Web application request is sent from the client's browser
to the web server.
From there, the web server will reach back to the database
server for content to return to the client's browser.
The response from the web server is sent back to the
client's browser and then rendered
in the browser's software.
With the web service, the web server and database
work together in the same way.
The main difference is that the data returned to the client
is not rendered in the browser.
A web service request is sent from the client
to the web service.
This request is normally in the form of
soap or rest.
The web service then responds with data in the form of
XML or JSON.
It's then up to the client application to consume that data
and display it to the user.
This is very common with mobile applications
where the mobile application speaks to the web service
in the form of soap or, many times, rest,
and the web service responds to the mobile application
in the form of XML or JSON
and the data that you see rendered in the mobile application
is what was returned from the web service.
It can also be used in desktop applications
as well as server-to-server communications.