1 00:00:06,577 --> 00:00:09,114 - [Instructor] So as we've discussed, a web server would 2 00:00:09,114 --> 00:00:12,130 normally have a front-end web server 3 00:00:12,130 --> 00:00:14,898 and a back-end database server. 4 00:00:14,898 --> 00:00:18,285 Sometimes, this is all part of the same machine. 5 00:00:18,285 --> 00:00:22,014 Web application request is sent from the client's browser 6 00:00:22,014 --> 00:00:23,603 to the web server. 7 00:00:23,603 --> 00:00:27,036 From there, the web server will reach back to the database 8 00:00:27,036 --> 00:00:31,835 server for content to return to the client's browser. 9 00:00:31,835 --> 00:00:34,435 The response from the web server is sent back to the 10 00:00:34,435 --> 00:00:37,024 client's browser and then rendered 11 00:00:37,024 --> 00:00:39,191 in the browser's software. 12 00:00:41,963 --> 00:00:44,767 With the web service, the web server and database 13 00:00:44,767 --> 00:00:46,887 work together in the same way. 14 00:00:46,887 --> 00:00:50,735 The main difference is that the data returned to the client 15 00:00:50,735 --> 00:00:53,914 is not rendered in the browser. 16 00:00:53,914 --> 00:00:57,664 A web service request is sent from the client 17 00:00:57,664 --> 00:00:59,635 to the web service. 18 00:00:59,635 --> 00:01:02,667 This request is normally in the form of 19 00:01:02,667 --> 00:01:04,971 soap or rest. 20 00:01:04,971 --> 00:01:08,784 The web service then responds with data in the form of 21 00:01:08,784 --> 00:01:10,451 XML or JSON. 22 00:01:11,550 --> 00:01:16,103 It's then up to the client application to consume that data 23 00:01:16,103 --> 00:01:18,790 and display it to the user. 24 00:01:18,790 --> 00:01:22,241 This is very common with mobile applications 25 00:01:22,241 --> 00:01:27,145 where the mobile application speaks to the web service 26 00:01:27,145 --> 00:01:30,562 in the form of soap or, many times, rest, 27 00:01:31,570 --> 00:01:35,686 and the web service responds to the mobile application 28 00:01:35,686 --> 00:01:38,436 in the form of XML or JSON 29 00:01:39,677 --> 00:01:44,661 and the data that you see rendered in the mobile application 30 00:01:44,661 --> 00:01:47,559 is what was returned from the web service. 31 00:01:47,559 --> 00:01:50,442 It can also be used in desktop applications 32 00:01:50,442 --> 00:01:53,913 as well as server-to-server communications.