You are on page 1of 19

Web Services

Vo Thanh Hung

Chapter 2
Web Services The concept of
Web service

Web Services
Languages
Mobile Application Development (Formats)

Implement

Example - REST

Exercise
Vo Thanh Hung
Faculty of Computer Science and Engineering
Ho Chi Minh University of Technology, VNU-HCM

2.1
Web Services
Overview
Vo Thanh Hung

1 The concept of Web service

The concept of
2 Web Services Languages (Formats) Web service

Web Services
Languages
(Formats)

3 Implement Implement

Example - REST

Exercise
4 Example - REST

5 Exercise

2.2
Web Services
What is?
Vo Thanh Hung

The concept of
Web service
"a software system designed to support interoperable Web Services
Languages
machine-to-machine interaction over a network" (W3C. (Formats)

2004-02-11) Implement

Example - REST

Exercise

2.3
Web Services
What is?
Vo Thanh Hung

The concept of
• port 80 or 443 Web service

Web Services
Languages
(Formats)

Implement

Example - REST

Exercise

2.4
Web Services
What is?
Vo Thanh Hung

The concept of
• port 80 or 443 Web service

Web Services
Languages

• plain text (Formats)

Implement

Example - REST

Exercise

2.4
Web Services
What is?
Vo Thanh Hung

The concept of
• port 80 or 443 Web service

Web Services
Languages

• plain text (Formats)

Implement

Example - REST

• work with the Hypertext Transfer Protocol Exercise

2.4
Web Services
Advantages of WS
Vo Thanh Hung

• ease of access and ease of consumption The concept of


Web service

Web Services
Languages
(Formats)

Implement

Example - REST

Exercise

2.5
Web Services
Advantages of WS
Vo Thanh Hung

• ease of access and ease of consumption The concept of


Web service

Web Services
Languages
• consumability, which is the ability to (Formats)

Implement
understand what the server is Example - REST

communicating Exercise

2.5
Web Services
WS Languages
Vo Thanh Hung

The concept of
Web service
• XML Web Services
Languages
(Formats)

Implement

Example - REST
-> human-readable text documents Exercise

2.6
Web Services
WS Languages
Vo Thanh Hung

The concept of
Web service
• XML Web Services
Languages
(Formats)
• JSON Implement

Example - REST
-> human-readable text documents Exercise

2.6
Web Services
WS Languages
Vo Thanh Hung

Exercise The concept of


Web service

How about non-textual data, example image, Web Services


Languages
(Formats)
video, PDF document,... Implement

Example - REST

Exercise

2.7
Web Services
WS Languages
Vo Thanh Hung

Exercise The concept of


Web service

How about non-textual data, example image, Web Services


Languages
(Formats)
video, PDF document,... Implement

Example - REST

• Base64 Exercise

2.7
Web Services
How to implement?
Vo Thanh Hung

The concept of
Web service
Exercise
Web Services
Languages
How to implement? What language can be (Formats)

Implement
used? ... Example - REST

Exercise

2.8
Web Services
Principles of REST
Vo Thanh Hung

The concept of
Web service

Web Services
Languages
(Formats)

Implement

Example - REST

Exercise

(Source: https://spring.io/understanding/REST)
2.9
Web Services
Principles of REST
Vo Thanh Hung

• Resources expose easily understood


directory structure URIs.

The concept of
Web service

Web Services
Languages
(Formats)

Implement

Example - REST

Exercise

(Source: https://spring.io/understanding/REST)
2.9
Web Services
Principles of REST
Vo Thanh Hung

• Resources expose easily understood


directory structure URIs.
• Representations transfer JSON or XML
The concept of
to represent data objects and attributes. Web service

Web Services
Languages
(Formats)

Implement

Example - REST

Exercise

(Source: https://spring.io/understanding/REST)
2.9
Web Services
Principles of REST
Vo Thanh Hung

• Resources expose easily understood


directory structure URIs.
• Representations transfer JSON or XML
The concept of
to represent data objects and attributes. Web service

Web Services
• Messages use HTTP methods explicitly Languages
(Formats)

(for example, GET, POST, PUT, and Implement

Example - REST
DELETE). Exercise

(Source: https://spring.io/understanding/REST)
2.9
Web Services
Principles of REST
Vo Thanh Hung

• Resources expose easily understood


directory structure URIs.
• Representations transfer JSON or XML
The concept of
to represent data objects and attributes. Web service

Web Services
• Messages use HTTP methods explicitly Languages
(Formats)

(for example, GET, POST, PUT, and Implement

Example - REST
DELETE). Exercise

• Stateless interactions store no client


context on the server between requests.
State dependencies limit and restrict
scalability. The client holds session state.
(Source: https://spring.io/understanding/REST)
2.9
Web Services
Building a RESTful Web Service
Vo Thanh Hung

The concept of
Web service

Web Services

https://spring.io/guides/gs/rest-service/ Languages
(Formats)

Implement

Example - REST

Exercise

2.10

You might also like