当前位置:网站首页>Advantages and disadvantages of rest ful API
Advantages and disadvantages of rest ful API
2022-07-07 23:08:00 【Scale biubiu】
advantage :
1. Suitable for high openness API. In recent years, the popularity of mobile Internet has diversified front-end devices , The industry urgently needs a unified mechanism to regulate API Design , bring API Suitable for all kinds of front end devices ,REST Meet this need .
2. Separation of behavior and resources , Easier to understand .
3. Propose to use version number ( for example v1、v2), More specification .
shortcoming :
1. High requirements for back-end developers , Business logic is sometimes difficult to be abstracted as the addition, deletion, modification and query of resources .
2. Not friendly to front-end developers ,API The grain size is coarse , It is difficult to query data that meets special requirements , The same business is better than ordinary API More than once HTTP request .
————————————————
Copyright notice : This paper is about CSDN Blogger 「UNT」 The original article of , follow CC 4.0 BY-SA Copyright agreement , For reprint, please attach the original source link and this statement .
Link to the original text :https://blog.csdn.net/qq_34098903/article/details/81116103
Personal view : I think the above great Xia's writing is very concise , and APP After communicating with front-end colleagues , Or decide not to use restful style , It will increase the difficulty of interface docking , It is also easy to make mistakes in the agreement , Conventional get/post The way , Clearly define interface functions , It's more convenient , And for safety , The difference is not big , Signature mechanism + secret key + Timestamps can also filter some of the hazards , So I decided not to use it for the time being . As for version number , We also according to our own situation , Combined with the experience of everyone on the Internet , I have defined the rules . It can be well adapted and compatible .
边栏推荐
猜你喜欢
Knowledge drop - PCB manufacturing process flow
Microbial Health Network, How to restore Microbial Communities
Microbial health network, how to restore microbial communities
知识点滴 - PCB制造工艺流程
Sword finger offer 55 - I. depth of binary tree
微生物健康网,如何恢复微生物群落
行測-圖形推理-4-字母類
ASEMI整流桥KBPC1510的型号数字代表什么
Line test - graphic reasoning - 1 - Chinese character class
Unity and webgl love each other
随机推荐
This time, let's clear up: synchronous, asynchronous, blocking, non blocking
Leetcode19. Delete the penultimate node of the linked list [double pointer]
Statistical method for anomaly detection
【测试面试题】页面很卡的原因分析及解决方案
行测-图形推理-6-相似图形类
V20变频器手自动切换(就地远程切换)的具体方法示例
行测-图形推理-4-字母类
GBU1510-ASEMI电源专用15A整流桥GBU1510
Debezium series: binlogreader for source code reading
行测-图形推理-3-对称图形类
Transparent i/o model from beginning to end
开发那些事儿:Go加C.free释放内存,编译报错是什么原因?
Exploratory data analysis of heartbeat signal
微生物健康网,如何恢复微生物群落
The wonderful relationship between message queue and express cabinet
Talk about DART's null safety feature
Line test - graphic reasoning - 3 - symmetric graphic class
定位到最底部[通俗易懂]
De la famille debezium: SET ROLE statements supportant mysql8
CTF exercise