SlideShare a Scribd company logo
Introduction to
Computing
FPT UNIVERSITY (HCMC –Vietnam)
Class: IA1161
Basic about
RESTful Web Service
Feb 24th, 2016
Duc LaiTrung Minh
DucLTMSE62220@fpt.edu.vn
ABOUT ME
Name: Duc Lai Trung Minh
English name: Henry Lai
Email: DucLTMSE62220@fpt.edu.vn
Website: http://minhduclaitrung.wordpress.com
LinkedIn: https://vn.linkedin.com/in/duclaitrungminh
The Content Is Written
InVietnamese
NỘI DUNG
• Định nghĩa RESTful Web Service
• Định nghĩa URLs
• Phương thức HTTP thực hiện CRUD
• Nguyên tắc sử dụng
• Mô hình thiết kế đề xuất
• DEMO
• Hỏi/ Đáp
• Nguồn tham khảo
• Phụ lục
ĐỊNH NGHĨA REST
• Quy tắc thiết kế Web Service trên Server
• Bằng cách xây dựng các URLs
• Cho các thao tác CRUD ( Create – Read – Update – Delete)
• Thông qua các giao thức HTTP (HTTP Request Method)
• (Có thể trả về dữ liệu dạng JSON/ XML)
ĐỊNH NGHĨA URL
• https://minhduclaitrung.wordpress.com/2015/12/12
/ky-3-tao-website-wordpress-tren-nen-tang-
microsoft-azure/
• https://minhduclaitrung.wordpress.com/{year}/{mo
nth}/{day}/{title}
HTTP Request Method cho REST
• POST
• GET
• PUT
• DELETE
Tạo tài nguyên
Truy xuất tài nguyên
Cập nhật tài nguyên
Xóa tài nguyên
Source: IBM.com
• CREATE
• READ
• UPDATE
• DELETE
NGUYÊN TẮC XÂY DỰNG
• Sử dụng một ngôn ngữ lập trình chạy trên Server (PHP,
ASP.NET, Java,…) để tiếp nhận và phản hồi truy xuất từ
Clients.
• Kết hợp với hệ cơ sở dữ liệu (MySQL, MongoDB, SQL
Server, Redis,…) để xử lý tài nguyên.
MÔ HÌNH ĐỀ XUẤT
HTTP
Request
Path Method Ý nghĩa
GET / index Lấy tất cả ticket
GET /create create Vô trang tạo ticket
POST /ticket store Tạo ticket
GET /{ticketid} show Xem thông tin ticket tại ticketID
GET /{ticketid}/edit edit
Vô trang sửa thông tin ticket tại
ticketID
PUT /{ticketid} update Sửa thông tin ticket có ticketID
DELETE /{ticketid} destroy Xóa ticket
Source: Laravel.com
Adapted by: DucLTM
DEMO
- RESTful API: http://ducltmse62220.azurewebsites.net/TicketI2C/API
- Website: http://ducltmse62220.azurewebsites.net/TicketI2C/WEB
- Language: PHP 5.6
- Database: MySQL
- Server: Microsoft Azure
- APITester: Postman on Chrome
- Terminated Site date: March 8th, 2016
WEBSITE
For More Detail About How This Site Works, Please Check Out
https://www.laravel.com
GET: /
GET: /create
POST: /
GET: /{ticketid}
GET: /{ticketid}/edit
PUT: /{ticketid}
DELETE: /{ticketid}
API
GET: /
POST: /
GET: /{ticketid}
PUT: /{ticketid}
DELETE: /{ticketid}
REFERENCE
• URL/ URI: https://danielmiessler.com/study/url-uri/
• IBM RESTful Web Service:
http://www.ibm.com/developerworks/library/ws-
restful/
• Laravel: https://laravel.com
Q/A
Name: Duc Lai Trung Minh
English name: Henry Lai
Email: DucLTMSE62220@fpt.edu.vn
Website: http://minhduclaitrung.wordpress.com
LinkedIn: https://vn.linkedin.com/in/duclaitrungminh
THANKYOU

More Related Content

PPTX
Seo project
PDF
Php 01 modau
PDF
Bai1 tong quan PHP
PPT
PPTX
Bai 4 Thiết kế SideBar của trang web
DOCX
Summative test in mother tounge III
PPTX
ADJECTIVES Lesson for Grade 2 students
PDF
K TO 12 GRADE 1 LEARNING MATERIAL IN MOTHER TONGUE BASED (Q1-Q2)
Seo project
Php 01 modau
Bai1 tong quan PHP
Bai 4 Thiết kế SideBar của trang web
Summative test in mother tounge III
ADJECTIVES Lesson for Grade 2 students
K TO 12 GRADE 1 LEARNING MATERIAL IN MOTHER TONGUE BASED (Q1-Q2)

Similar to [CSI101] - RESTful Presentation in Introduction to Computing (20)

PPT
chuong_02.ppt
PDF
lap-trinh-web_nguyen-huy-khanh_web1-10-php-web-form - [cuuduongthancong.com].pdf
PDF
Aspnet 3.5 _04
PPT
PDF
Net06 asp.net applications & state management
PDF
Bài 4: Thao tác với dữ liệu SharePoint thông qua ADO.NET Data Services và REST
PPTX
Lập trình web với các công nghệ phổ biến
PPT
Tổng quan về Internet và một số tính chất cơ bản
PPT
Tổng quan về báo chí và một số nội dung cơ bản
PPT
Ung dun web chuong 2
PDF
Web course php truyen nhan du lieu
PDF
Bai th08 php voi csdl
PPTX
Mvc Model
PDF
Bài 2 - Công nghệ ADO.NET với C#
PDF
C5. Model, DataSharing.pdf
PDF
PHP có thể làm gì? 9 Thứ thú vị có thể làm với PHP
PPTX
Đề tài tìm hiểu WCF
PPT
Slide Web Service
PDF
đồ áN thiết kế web tuyển dụng sử dụng asp.net
chuong_02.ppt
lap-trinh-web_nguyen-huy-khanh_web1-10-php-web-form - [cuuduongthancong.com].pdf
Aspnet 3.5 _04
Net06 asp.net applications & state management
Bài 4: Thao tác với dữ liệu SharePoint thông qua ADO.NET Data Services và REST
Lập trình web với các công nghệ phổ biến
Tổng quan về Internet và một số tính chất cơ bản
Tổng quan về báo chí và một số nội dung cơ bản
Ung dun web chuong 2
Web course php truyen nhan du lieu
Bai th08 php voi csdl
Mvc Model
Bài 2 - Công nghệ ADO.NET với C#
C5. Model, DataSharing.pdf
PHP có thể làm gì? 9 Thứ thú vị có thể làm với PHP
Đề tài tìm hiểu WCF
Slide Web Service
đồ áN thiết kế web tuyển dụng sử dụng asp.net
Ad

More from Duc Lai Trung Minh (20)

PDF
HCMUT IMP Computer Science 20 - E-Government from the view of Privacy
PDF
Vietnam Global Azure Bootcamp 2019 - Security on Azure Kubernetes Services wi...
PDF
21st Meeting - Compare SQL Server and MySQL
PPTX
20190310 - SQL Course - JOIN
PDF
20180922 - 11st meeting - Power BI Module 3 - Part 1
PDF
20180908 - 10th Meeting - Power BI Module 2
PDF
20180901 - 9th Meeting - Power BI Module 0-1
PPTX
20180826 - 8th Meeting - Power BI Orientation
PDF
7th meeting - Analysis Toolpak - Solver - Forecast Worksheet
PDF
Oracle DB 11g R2 Research (Installation, Users and Privileges, Audit Trail, E...
PPTX
20180707 - 2nd meeting - Group Orientation
PPTX
20180701 - 1st Meeting - Data Science Orientation
DOCX
In your opinion, how to avoid communication barriers. Write a short paragraph...
DOCX
Computer Forensics Report - FRS301 - FPT University
PPTX
[MSPVN - Azure Workshop] Day 2 - Azure Web App and WooCommerce for Online Shop
PPTX
[MSPVN - Azure Workshop] Day 1 - Azure Web App with WordPress deployment
PDF
Duc Lai Trung Minh - Resume - Summer 2017
PDF
[Marketing Arena 2017][First Round] Team SHARP
PPTX
[Privacy and IT Ethics Presentation] Chapter 3: The Forth Amendment and emer...
PPTX
[LSC Training] Tech Training Session
HCMUT IMP Computer Science 20 - E-Government from the view of Privacy
Vietnam Global Azure Bootcamp 2019 - Security on Azure Kubernetes Services wi...
21st Meeting - Compare SQL Server and MySQL
20190310 - SQL Course - JOIN
20180922 - 11st meeting - Power BI Module 3 - Part 1
20180908 - 10th Meeting - Power BI Module 2
20180901 - 9th Meeting - Power BI Module 0-1
20180826 - 8th Meeting - Power BI Orientation
7th meeting - Analysis Toolpak - Solver - Forecast Worksheet
Oracle DB 11g R2 Research (Installation, Users and Privileges, Audit Trail, E...
20180707 - 2nd meeting - Group Orientation
20180701 - 1st Meeting - Data Science Orientation
In your opinion, how to avoid communication barriers. Write a short paragraph...
Computer Forensics Report - FRS301 - FPT University
[MSPVN - Azure Workshop] Day 2 - Azure Web App and WooCommerce for Online Shop
[MSPVN - Azure Workshop] Day 1 - Azure Web App with WordPress deployment
Duc Lai Trung Minh - Resume - Summer 2017
[Marketing Arena 2017][First Round] Team SHARP
[Privacy and IT Ethics Presentation] Chapter 3: The Forth Amendment and emer...
[LSC Training] Tech Training Session
Ad

[CSI101] - RESTful Presentation in Introduction to Computing

  • 1. Introduction to Computing FPT UNIVERSITY (HCMC –Vietnam) Class: IA1161
  • 2. Basic about RESTful Web Service Feb 24th, 2016 Duc LaiTrung Minh DucLTMSE62220@fpt.edu.vn
  • 3. ABOUT ME Name: Duc Lai Trung Minh English name: Henry Lai Email: DucLTMSE62220@fpt.edu.vn Website: http://minhduclaitrung.wordpress.com LinkedIn: https://vn.linkedin.com/in/duclaitrungminh
  • 4. The Content Is Written InVietnamese
  • 5. NỘI DUNG • Định nghĩa RESTful Web Service • Định nghĩa URLs • Phương thức HTTP thực hiện CRUD • Nguyên tắc sử dụng • Mô hình thiết kế đề xuất • DEMO • Hỏi/ Đáp • Nguồn tham khảo • Phụ lục
  • 6. ĐỊNH NGHĨA REST • Quy tắc thiết kế Web Service trên Server • Bằng cách xây dựng các URLs • Cho các thao tác CRUD ( Create – Read – Update – Delete) • Thông qua các giao thức HTTP (HTTP Request Method) • (Có thể trả về dữ liệu dạng JSON/ XML)
  • 7. ĐỊNH NGHĨA URL • https://minhduclaitrung.wordpress.com/2015/12/12 /ky-3-tao-website-wordpress-tren-nen-tang- microsoft-azure/ • https://minhduclaitrung.wordpress.com/{year}/{mo nth}/{day}/{title}
  • 8. HTTP Request Method cho REST • POST • GET • PUT • DELETE Tạo tài nguyên Truy xuất tài nguyên Cập nhật tài nguyên Xóa tài nguyên Source: IBM.com • CREATE • READ • UPDATE • DELETE
  • 9. NGUYÊN TẮC XÂY DỰNG • Sử dụng một ngôn ngữ lập trình chạy trên Server (PHP, ASP.NET, Java,…) để tiếp nhận và phản hồi truy xuất từ Clients. • Kết hợp với hệ cơ sở dữ liệu (MySQL, MongoDB, SQL Server, Redis,…) để xử lý tài nguyên.
  • 10. MÔ HÌNH ĐỀ XUẤT HTTP Request Path Method Ý nghĩa GET / index Lấy tất cả ticket GET /create create Vô trang tạo ticket POST /ticket store Tạo ticket GET /{ticketid} show Xem thông tin ticket tại ticketID GET /{ticketid}/edit edit Vô trang sửa thông tin ticket tại ticketID PUT /{ticketid} update Sửa thông tin ticket có ticketID DELETE /{ticketid} destroy Xóa ticket Source: Laravel.com Adapted by: DucLTM
  • 11. DEMO - RESTful API: http://ducltmse62220.azurewebsites.net/TicketI2C/API - Website: http://ducltmse62220.azurewebsites.net/TicketI2C/WEB - Language: PHP 5.6 - Database: MySQL - Server: Microsoft Azure - APITester: Postman on Chrome - Terminated Site date: March 8th, 2016
  • 12. WEBSITE For More Detail About How This Site Works, Please Check Out https://www.laravel.com
  • 20. API
  • 26. REFERENCE • URL/ URI: https://danielmiessler.com/study/url-uri/ • IBM RESTful Web Service: http://www.ibm.com/developerworks/library/ws- restful/ • Laravel: https://laravel.com
  • 27. Q/A Name: Duc Lai Trung Minh English name: Henry Lai Email: DucLTMSE62220@fpt.edu.vn Website: http://minhduclaitrung.wordpress.com LinkedIn: https://vn.linkedin.com/in/duclaitrungminh