Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
REST_vs_GraphQL_今夜はご注文はどっち.pdf
Search
CypressKuo
February 23, 2021
Technology
27
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
REST_vs_GraphQL_今夜はご注文はどっち.pdf
CypressKuo
February 23, 2021
More Decks by CypressKuo
See All by CypressKuo
Deep-copying.pdf
cypresskuo
0
41
CSS_for_Web_Vitals.pdf
cypresskuo
0
46
談談_Code_review.pdf
cypresskuo
0
52
CSS_重構.pdf
cypresskuo
0
30
跟上_JS_的腳步-ES2020.pdf
cypresskuo
0
35
Core_Web_Vitals.pdf
cypresskuo
0
61
這個時代人人都知道的敏捷開發.pdf
cypresskuo
0
65
Webassembly.pdf
cypresskuo
0
17
談談_Functional_Programming.pdf
cypresskuo
0
32
Other Decks in Technology
See All in Technology
Network Firewallやっていき!
news_it_enj
0
170
「最後に責任を取るのはチーム」— 人間のPRレビューを最小化してアップデートしたメンタルモデル
jnishime_dresscode
0
920
“それは自分の仕事じゃない"を越えて行け
yuukiyo
1
480
「守りたい体験」を渡すだけで E2E を生成させられるようになった話
hinac0
1
500
変更し続けられるシステムをどう保つか — AI時代のSSoTという設計原則
kawauso
0
140
Amplify Gen2でbackend.tsにCDKを定義する/しない事によるCDKの挙動の違いとユースケース
smt7174
1
420
しくみを学んで使いこなそう GitHub Copilot app
torumakabe
2
290
SRE本の知られざる名シーン / The Hidden Gems of Google SRE Book
nari_ex
1
420
ruby.wasmとPicoRuby.wasmに対応した仮想DOMライブラリを作ってる話 #kaigieffect_kaigi
sue445
PRO
0
150
10年目を迎えた「ABEMA」がどのように AI 活用を推進して、AI 駆動開発にシフトしているのか / How ABEMA, entering its 10th year, is promoting the use of AI and shifting toward AI-driven development
miyukki
0
280
非定型なドキュメントを効率よくリファクタする 〜えぇ!?仕様書27本の移行が1日で終わったって!?〜
subroh0508
2
560
CSに"SLO"は要らない、経営層に"99.9%"は伝わらない - SREを全社に"翻訳"する3原則
cscengineer
PRO
1
5.1k
Featured
See All Featured
The Mindset for Success: Future Career Progression
greggifford
PRO
0
420
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
Deep Space Network (abreviated)
tonyrice
0
230
KATA
mclloyd
PRO
35
15k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
180
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
67
56k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
Transcript
The material contained in this documentation is proprietary and confidential
to PIXNET. Copies are made available on the basis that use is limited to the sole purpose of evaluating PIXNET’s capabilities. It is not permissible to use, modify, copy or disclose any information contained in this presentation document for any other purpose without the express written permission of PIXNET. If you are not the intended recipient of this material you are requested to take immediate steps to destroy it. Copyright © 2018 PIXNET. All rights reserved. REST vs GraphQL 今夜はご注文はどっち cypresskuo @JAAD例會 2020/10/06
RESTful API 特性 • 動詞 + 受詞 • 冪等性(Idempotent) •
回傳狀態碼 • 無狀態
RESTful API 優點 • 簡單且統一的 API 接口 • 降低系統資料之間的耦合性 •
好維護、除錯(搭配 Status Code) • 實做 Cache 較簡單(冪等性)
RESTful API 缺點 • 低耦合性 -> 高鬆散 • 資料重覆 •
資料溢出
GraphQL • 2012 年 Facebook 發明了 GraphQL • 2015 年開源
• 2018 年 Facebook 將 GraphQL 項目轉移到新成立的 GraphQL 基金會(隸 屬於非營利性的 Linux 基金會)
GraphQL 特性 • 單一個 API 接口 • 始終使用 POST 請求
• 資料需求驅動設計(Driven by data requirement) • 強型別
GraphQL 特性 https://www.example.com/api/graphql
GraphQL 特性
GraphQL 優點 • 減少 Request 的次數 • 精準資料 • 無需為了多平台而設計多個
API 系統 • 前端控制權提升
GraphQL 架構
GraphQL 架構
GraphQL 架構
GraphQL 架構
GraphQL 缺點 • 規範少(易出現 Anti Pattern) • 學習成本高 • Cache
實作較難
REST vs GraphQL どっち
Q & A
Thanks for listening