WEBVTT

0:00:03.520000 --> 0:00:07.700000
 Hello, everyone, and welcome to the
 first section of this course.

0:00:07.700000 --> 0:00:11.320000
 In this video, we're going to be getting
 a formal introduction to web

0:00:11.320000 --> 0:00:15.600000
 services. So if this is your first
 time hearing about web services or

0:00:15.600000 --> 0:00:19.840000
 you're not to show what they are and
 how they work, this section is for

0:00:19.840000 --> 0:00:23.780000
 you and this video in particular is
 going to answer those questions.

0:00:23.780000 --> 0:00:29.900000
 So to kick things off, what is a web
 service or what are web services?

0:00:29.900000 --> 0:00:34.060000
 Web services are software components
 designed to facilitate communication

0:00:34.060000 --> 0:00:39.780000
 and data exchange between different applications
 or systems over the internet.

0:00:39.780000 --> 0:00:45.480000
 So the primary thing or the primary
 reason as to why they were created

0:00:45.480000 --> 0:00:48.340000
 was to facilitate communication.

0:00:48.340000 --> 0:00:54.720000
 So what were they facilitating or between
 what systems were they facilitating

0:00:54.720000 --> 0:00:56.580000
 communication with?

0:00:56.580000 --> 0:00:59.980000
 Well, in order to answer that question,
 we firstly need to understand

0:00:59.980000 --> 0:01:03.920000
 where we have come from or
 why they were created.

0:01:03.920000 --> 0:01:07.120000
 So web services were essentially created.


0:01:07.120000 --> 0:01:09.920000
 Now I'm using a very basic example here.

0:01:09.920000 --> 0:01:14.180000
 Web services or APIs were created so
 that two computers can communicate

0:01:14.180000 --> 0:01:19.420000
 with one another and understand one
 another without the need for human

0:01:19.420000 --> 0:01:25.460000
 interaction. So in the context of web
 services specifically, given that

0:01:25.460000 --> 0:01:32.120000
 they are designed to be run on the
 web, think of a very basic example

0:01:32.120000 --> 0:01:36.760000
 where, let's take a look at a web application
 like a simple website that

0:01:36.760000 --> 0:01:41.040000
 allows users to log in, create a blog
 post or something like WordPress,

0:01:41.040000 --> 0:01:46.840000
 right? WordPress and the way it is designed
 as a web application, it is

0:01:46.840000 --> 0:01:52.120000
 designed to be a web application to
 be used by human beings, which means

0:01:52.120000 --> 0:01:56.700000
 it has a user interface and everything
 makes sense to a human being.

0:01:56.700000 --> 0:02:01.840000
 However, when we bring, let's say,
 another server into the picture and

0:02:01.840000 --> 0:02:06.060000
 let's say we want the WordPress site
 to communicate with that other web

0:02:06.060000 --> 0:02:12.660000
 server for whatever reason, let's say
 they wanted to communicate with

0:02:12.660000 --> 0:02:17.200000
 one another. How would that other web
 server interact with the WordPress

0:02:17.200000 --> 0:02:19.960000
 web application or website?

0:02:19.960000 --> 0:02:25.160000
 That's really the actual primary question
 behind the reason as to why

0:02:25.160000 --> 0:02:29.460000
 web services were created because remember,
 computers do not know what

0:02:29.460000 --> 0:02:32.400000
 a UI is. They cannot interact with a UI.

0:02:32.400000 --> 0:02:36.200000
 They just, at least in the case of the
 WordPress server, they just know

0:02:36.200000 --> 0:02:38.280000
 how to handle specific action.

0:02:38.280000 --> 0:02:42.320000
 When you click a button, again, the web
 server doesn't know that you have

0:02:42.320000 --> 0:02:44.720000
 actually visually clicked a button.

0:02:44.720000 --> 0:02:48.100000
 What they're doing is processing
 the request that they received.

0:02:48.100000 --> 0:02:50.080000
 That's why web services were created.

0:02:50.080000 --> 0:02:54.620000
 They were created so that two computers
 can communicate with one another.

0:02:54.620000 --> 0:03:00.100000
 In the case of APIs, APIs were created
 so that two applications specifically

0:03:00.100000 --> 0:03:04.320000
 could communicate and interact with one
 another without the need or without

0:03:04.320000 --> 0:03:08.760000
 the use of human beings
 or user interfaces.

0:03:08.760000 --> 0:03:12.400000
 That's why whenever you interact with
 an API and try and open up an API

0:03:12.400000 --> 0:03:17.440000
 endpoint within your browser, you
 just either get XML or JSON.

0:03:17.440000 --> 0:03:21.880000
 If you study the output, you'll see
 that only the essential information

0:03:21.880000 --> 0:03:27.340000
 or specific information is being
 sent through an API endpoint.

0:03:27.340000 --> 0:03:32.360000
 The bottom line is that they allow disparate
 applications or systems to

0:03:32.360000 --> 0:03:36.880000
 work together, even if they are developed
 on different platforms using

0:03:36.880000 --> 0:03:40.820000
 different programming languages
 or running on different servers.

0:03:40.820000 --> 0:03:45.260000
 I'll explain the differences between
 web application and a web service

0:03:45.260000 --> 0:03:47.720000
 and an API later on in this video.

0:03:47.720000 --> 0:03:52.800000
 But going again deeper into the definition
 of web services and how they

0:03:52.800000 --> 0:03:58.320000
 work, they are usually intended to
 facilitate the integration between

0:03:58.320000 --> 0:04:03.440000
 applications. An example here is that
 application A utilizes features

0:04:03.440000 --> 0:04:08.580000
 that are only implemented or only
 available in application B.

0:04:08.580000 --> 0:04:13.360000
 That's a very common example
 or an actual use case.

0:04:13.360000 --> 0:04:16.640000
 Secondly, separation within
 an application.

0:04:16.640000 --> 0:04:21.820000
 Think of the actual functionality of
 an application being broken down

0:04:21.820000 --> 0:04:26.000000
 into the front end and the back end but
 also including another component.

0:04:26.000000 --> 0:04:30.800000
 Front end scripts that use web service
 functionality to dynamically update

0:04:30.800000 --> 0:04:33.600000
 the content. That's another example.

0:04:33.600000 --> 0:04:36.020000
 You don't see it quite often.

0:04:36.020000 --> 0:04:41.180000
 If you do see an API that's built within
 the overall architecture of a

0:04:41.180000 --> 0:04:45.660000
 web application, they're typically there
 to facilitate processing of specific

0:04:45.660000 --> 0:04:52.240000
 requests like financial transactions
 or maybe even generating OTP codes,

0:04:52.240000 --> 0:04:58.960000
 etc. These are two examples of what
 web services are usually intended

0:04:58.960000 --> 0:05:04.100000
 to facilitate or why they were created
 and how they're typically used.

0:05:04.100000 --> 0:05:07.380000
 That brings us to the penultimate
 slide within this video.

0:05:07.380000 --> 0:05:12.640000
 That is what is the difference between
 a web service and a web application.

0:05:12.640000 --> 0:05:16.840000
 Let's understand web services
 now as clearly as possible.

0:05:16.840000 --> 0:05:21.000000
 Web services are designed to facilitate
 communication and data exchange

0:05:21.000000 --> 0:05:26.800000
 between different software systems over
 the internet or different systems

0:05:26.800000 --> 0:05:31.740000
 altogether. They provide a standardized
 way for different applications

0:05:31.740000 --> 0:05:35.980000
 to interact with each other using protocols
 like SOAP which is the simple

0:05:35.980000 --> 0:05:40.120000
 object access protocol or REST which
 you should be familiar with if you

0:05:40.120000 --> 0:05:41.760000
 have ever interacted with an API.

0:05:41.760000 --> 0:05:44.740000
 REST is typically what you'll see now.

0:05:44.740000 --> 0:05:48.400000
 And web services are typically used
 for machine to machine communication

0:05:48.400000 --> 0:05:52.280000
 and are not meant for direct
 human interaction.

0:05:52.280000 --> 0:05:54.800000
 So that's why they're a little
 bit difficult to understand.

0:05:54.800000 --> 0:05:58.680000
 Whenever you open up an API endpoint,
 you might be a little bit confused.

0:05:58.680000 --> 0:06:02.520000
 And the reason you're confused is because
 that's the interface that is

0:06:02.520000 --> 0:06:07.240000
 being used by the two web applications
 or the two systems.

0:06:07.240000 --> 0:06:10.260000
 It is not meant to be understood
 by human beings.

0:06:10.260000 --> 0:06:16.400000
 Now, that's where I come into play in
 the form of this course to actually

0:06:16.400000 --> 0:06:20.260000
 show you how to understand what's
 going on behind the scenes.

0:06:20.260000 --> 0:06:25.160000
 So while naturally speaking, you cannot
 understand what exactly is going

0:06:25.160000 --> 0:06:30.040000
 on or the communication between a web
 service and a web application or

0:06:30.040000 --> 0:06:36.860000
 you cannot understand the schema being
 used between two different systems

0:06:36.860000 --> 0:06:41.340000
 communicating with each other through
 a web service or an API, there's

0:06:41.340000 --> 0:06:43.500000
 many ways you can sort of decipher that.

0:06:43.500000 --> 0:06:48.300000
 So in terms of web applications, you
 should already be familiar with what

0:06:48.300000 --> 0:06:49.560000
 they are and how they work.

0:06:49.560000 --> 0:06:53.460000
 But web applications are software programs
 that are accessed through a

0:06:53.460000 --> 0:06:57.400000
 web browser and they're designed to
 perform specific tasks or provide

0:06:57.400000 --> 0:07:02.040000
 services directly to end users or
 clients which are human beings.

0:07:02.040000 --> 0:07:06.060000
 And they are meant for human interaction
 and can range from simple websites

0:07:06.060000 --> 0:07:11.020000
 to complex web-based applications like
 email clients, social media platforms

0:07:11.020000 --> 0:07:13.740000
 or online shopping sites.

0:07:13.740000 --> 0:07:18.320000
 So you can see the difference here in terms
 of the architectural and functional

0:07:18.320000 --> 0:07:24.820000
 perspective that web services are essentially
 extending or giving other

0:07:24.820000 --> 0:07:30.220000
 systems or applications the ability
 to communicate with your web app and

0:07:30.220000 --> 0:07:36.180000
 to communicate effectively because before
 web services or APIs, two different

0:07:36.180000 --> 0:07:40.440000
 web applications could not communicate
 with one another especially in

0:07:40.440000 --> 0:07:44.660000
 a standardized structured way that both
 of those systems could understand

0:07:44.660000 --> 0:07:47.880000
 in terms of requests and responses.

0:07:47.880000 --> 0:07:52.360000
 So that brings us to this table here
 that pretty much distinguishes web

0:07:52.360000 --> 0:07:54.900000
 services from web applications.

0:07:54.900000 --> 0:07:58.880000
 And on the left hand side, the absolute
 left, you can see the different

0:07:58.880000 --> 0:08:03.280000
 aspects and then on the right hand
 side, you can see the split or the

0:08:03.280000 --> 0:08:08.240000
 actual aspect definition for each.

0:08:08.240000 --> 0:08:13.080000
 So in the case of web services, the
 primary purpose of a web service is

0:08:13.080000 --> 0:08:16.360000
 to facilitate data exchange
 between applications.

0:08:16.360000 --> 0:08:20.160000
 In the case of web applications, it's
 to provide services or perform tasks

0:08:20.160000 --> 0:08:22.660000
 directly for end users.

0:08:22.660000 --> 0:08:27.820000
 In terms of user interaction, in web
 services, there is no user interface

0:08:27.820000 --> 0:08:32.300000
 and it is meant for machine
 to machine communication.

0:08:32.300000 --> 0:08:36.880000
 In the case of web applications, they
 have a user friendly interface for

0:08:36.880000 --> 0:08:38.120000
 human interaction.

0:08:38.120000 --> 0:08:41.660000
 Typically speaking, of course, you will
 find some really badly designed

0:08:41.660000 --> 0:08:46.520000
 websites out there, but typically speaking,
 they have a UI user friendly

0:08:46.520000 --> 0:08:52.980000
 interface. And in terms of data exchange,
 in the case of web services,

0:08:52.980000 --> 0:08:57.980000
 there's a exchange of structured
 data between applications.

0:08:57.980000 --> 0:09:02.660000
 In the case of web applications, it
 involves user data input processing

0:09:02.660000 --> 0:09:04.420000
 and result presentation.

0:09:04.420000 --> 0:09:10.000000
 So the bottom line is because we have
 five senses, when we send something

0:09:10.000000 --> 0:09:13.700000
 in or we type something into a website,
 we want to see a response.

0:09:13.700000 --> 0:09:18.180000
 And that's why web applications are
 designed the way they are so that

0:09:18.180000 --> 0:09:28.120000
 when you put in your successful and
 you want a representation of that

0:09:28.120000 --> 0:09:32.420000
 fact, but with computers, they don't
 need that or with two applications

0:09:32.420000 --> 0:09:35.400000
 communicating with one another,
 they don't need that.

0:09:35.400000 --> 0:09:40.160000
 They pretty much just need to see the,
 for example, the HTTP response

0:09:40.160000 --> 0:09:44.580000
 with a 200 status code saying, yep,
 authentication was successful, you

0:09:44.580000 --> 0:09:50.420000
 can proceed. So in that form or in
 that way of thinking, I really like

0:09:50.420000 --> 0:09:52.800000
 how computers communicate
 with one another.

0:09:52.800000 --> 0:09:54.460000
 It's very effective.

0:09:54.460000 --> 0:09:56.880000
 You then have the communication protocol.


0:09:56.880000 --> 0:10:00.660000
 So in the case of web services, you
 know, web services utilize protocols

0:10:00.660000 --> 0:10:06.840000
 like SOAP REST, XML RPC or JSON RPC
 will be covering these in the next

0:10:06.840000 --> 0:10:10.560000
 set of videos. And in the case of web
 applications, as you know, they

0:10:10.560000 --> 0:10:15.560000
 utilize primarily utilize HTTP
 or HTTPS for communication.

0:10:15.560000 --> 0:10:20.680000
 In terms of the security focus, in
 the case of web services, there's a

0:10:20.680000 --> 0:10:24.740000
 focus on securing data during transmission
 and access control.

0:10:24.740000 --> 0:10:27.900000
 So essentially controlling
 access to an endpoint.

0:10:27.900000 --> 0:10:31.740000
 And then of course, securing
 the data in transit.

0:10:31.740000 --> 0:10:35.240000
 In the case of web applications, as you
 know, with all the courses within

0:10:35.240000 --> 0:10:39.020000
 this learning path, there's, you know,
 broader security aspects that need

0:10:39.020000 --> 0:10:43.480000
 to be taken into account, including
 authentication, authorization, data

0:10:43.480000 --> 0:10:47.940000
 validation and protection against other
 types of web based vulnerabilities.

0:10:47.940000 --> 0:10:52.260000
 In terms of examples, in the case of web
 services, you can think of payment

0:10:52.260000 --> 0:10:57.720000
 gateways like the PayPal, the PayPal
 API or whether data services.

0:10:57.720000 --> 0:11:00.960000
 In the case of web applications, I think
 you know what some common examples

0:11:00.960000 --> 0:11:06.380000
 are, you know, online banking, e-commerce,
 personal blog, emails, social

0:11:06.380000 --> 0:11:08.860000
 networking, so on and so forth.

0:11:08.860000 --> 0:11:13.620000
 So those are the differences between
 web services and web applications.

0:11:13.620000 --> 0:11:18.060000
 Now, coming into some key characteristics
 of web services, there are a

0:11:18.060000 --> 0:11:20.200000
 couple that you need to be aware of.

0:11:20.200000 --> 0:11:22.740000
 Firstly, the interoperability.

0:11:22.740000 --> 0:11:27.100000
 So web services promote interoperability
 by providing a standardized way

0:11:27.100000 --> 0:11:29.340000
 for applications to communicate.

0:11:29.340000 --> 0:11:34.820000
 They rely on open standards like HTTP,
 XML, SOAP, REST and JSON to ensure

0:11:34.820000 --> 0:11:36.960000
 compatibility. So what does this mean?

0:11:36.960000 --> 0:11:42.060000
 It means that one of the key characteristics
 here is the fact that APIs

0:11:42.060000 --> 0:11:46.240000
 don't have an issue of translation.

0:11:46.240000 --> 0:11:49.920000
 Let's say if you wanted two applications
 to communicate with one another,

0:11:49.920000 --> 0:11:55.040000
 they are standardized protocols or frameworks
 designed to facilitate this.

0:11:55.040000 --> 0:11:59.720000
 So for example, when you, let's say when
 you are talking to another developer

0:11:59.720000 --> 0:12:03.400000
 and you have two web applications
 that you'd like to integrate.

0:12:03.400000 --> 0:12:07.940000
 So think of a good example here is
 think of your online banking portal

0:12:07.940000 --> 0:12:13.520000
 and QuickBooks. So QuickBooks allows
 you to integrate your online bank

0:12:13.520000 --> 0:12:18.760000
 into QuickBooks so that you can view
 your recent transactions, etc.

0:12:18.760000 --> 0:12:22.400000
 That integration is done through
 the form of an API.

0:12:22.400000 --> 0:12:29.140000
 Now how did the developers of your,
 how did the developers of your bank,

0:12:29.140000 --> 0:12:36.640000
 of your bank's sure that QuickBooks
 could communicate with that API, you

0:12:36.640000 --> 0:12:39.840000
 know, with the actual
 online banking portal?

0:12:39.840000 --> 0:12:44.220000
 They did that through the form of an
 API or a web service and the API

0:12:44.220000 --> 0:12:49.080000
 or web service was created or implemented
 using one of these standards

0:12:49.080000 --> 0:12:52.680000
 or frameworks. So it could be, it could
 have been a REST API, it could

0:12:52.680000 --> 0:12:54.020000
 have been a SOAP API.

0:12:54.020000 --> 0:12:58.060000
 And what that means is that QuickBooks
 at that point only needs to know

0:12:58.060000 --> 0:13:04.180000
 that and they it works.

0:13:04.180000 --> 0:13:10.060000
 You just, from that point on the bank
 just needs to tell QuickBooks how

0:13:10.060000 --> 0:13:15.100000
 the API works in terms of requests
 and response, you know, and various

0:13:15.100000 --> 0:13:19.820000
 parameters. And they typically will
 provide, you know, the actual API

0:13:19.820000 --> 0:13:25.560000
 documentation or in the case of SOAP
 based web services, they'll provide

0:13:25.560000 --> 0:13:32.320000
 the WSDL, right, which essentially tells
 human beings firstly, but also

0:13:32.320000 --> 0:13:37.920000
 computers, how the web service operates
 and what it can process in terms

0:13:37.920000 --> 0:13:39.700000
 of, you know, requests.

0:13:39.700000 --> 0:13:44.180000
 Secondly, you know, web services and
 APIs, generally speaking our platform

0:13:44.180000 --> 0:13:48.400000
 agnostic. So they are not tied to a specific
 operating system or programming

0:13:48.400000 --> 0:13:51.820000
 language and they can be developed in
 various technologies, making them

0:13:51.820000 --> 0:13:53.740000
 versatile and accessible.

0:13:53.740000 --> 0:13:58.740000
 So you know that we have operating
 specific APIs, we have web APIs or

0:13:58.740000 --> 0:14:02.540000
 web services and they're not really
 tied to, you know, either running

0:14:02.540000 --> 0:14:05.860000
 on Windows or Linux or on PHP or Python.

0:14:05.860000 --> 0:14:09.640000
 They pretty much are outside of that
 scope and do not require you to,

0:14:09.640000 --> 0:14:14.620000
 you know, factor in usability on
 a different operating system.

0:14:14.620000 --> 0:14:17.620000
 Moving forward, of course,
 loose coupling.

0:14:17.620000 --> 0:14:21.780000
 So web services allow for loosely coupled
 interactions between systems.

0:14:21.780000 --> 0:14:25.920000
 This means that changes in one system's
 implementation do not necessarily

0:14:25.920000 --> 0:14:28.420000
 disrupt the functionality
 of the other systems.

0:14:28.420000 --> 0:14:33.460000
 What this means is that let's say QuickBooks
 or the only in the example

0:14:33.460000 --> 0:14:38.120000
 earlier, let's say your banking portal,
 you know, gets an update in terms

0:14:38.120000 --> 0:14:41.760000
 of adding new features or stuff like
 that, that really will not affect,

0:14:41.760000 --> 0:14:46.860000
 you know, will not affect the actual
 API or the communication between

0:14:46.860000 --> 0:14:51.860000
 your banking portal and QuickBooks because
 of how, you know, loosely coupled

0:14:51.860000 --> 0:14:54.300000
 APIs or web services are.

0:14:54.300000 --> 0:14:56.160000
 And then of course you have
 location independent.

0:14:56.160000 --> 0:15:00.720000
 So web services operate on the, over
 the internet, making them location

0:15:00.720000 --> 0:15:04.700000
 independent. They can be hosted on different
 servers and can be accessed

0:15:04.700000 --> 0:15:07.000000
 from anywhere with an
 internet connection.

0:15:07.000000 --> 0:15:09.920000
 And they can also be hosted locally
 on your local area network.

0:15:09.920000 --> 0:15:14.660000
 So they're very, very flexible with
 that, you know, if you take that or

0:15:14.660000 --> 0:15:16.800000
 if you look at it from that perspective.

0:15:16.800000 --> 0:15:19.240000
 So that brings us to the
 end of this video.

0:15:19.240000 --> 0:15:22.120000
 Hopefully you got that formal
 introduction you are after.

0:15:22.120000 --> 0:15:25.180000
 As I said, I'll be making
 it clearer as we progress.

0:15:25.180000 --> 0:15:27.220000
 And that's always my objective here.

0:15:27.220000 --> 0:15:29.760000
 In the beginning things are
 still a little bit fuzzy.

0:15:29.760000 --> 0:15:33.660000
 But once you get to the end or at least
 to the end of this course, I'm

0:15:33.660000 --> 0:15:37.220000
 sure you'll understand web services
 and APIs much better.

0:15:37.220000 --> 0:15:39.900000
 With that being said, that's going
 to be it for this video.

0:15:39.900000 --> 0:15:41.880000
 And I'll be seeing you in the next video.


