当前位置:网站首页>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 .
边栏推荐
- [untitled] reprint melting ice - track icedid server with a few simple steps
- 嵌入式音频开发中的两种曲线
- Lecture 30 linear algebra Lecture 5 eigenvalues and eigenvectors
- 消息队列与快递柜之间妙不可言的关系
- 小程序多种开发方式对比-跨端?低代码?原生?还是云开发?
- 【刷题记录】3. 无重复字符的最长子串
- The author of LinkedList said he didn't use LinkedList himself
- Yarn cannot view the historical task log of yarn after enabling ACL user authentication. Solution
- ADC采样率(HZ)是什么怎么计算
- Debezium系列之:源码阅读之SnapshotReader
猜你喜欢
数据库每日一题---第22天:最后一次登录
GBU1510-ASEMI电源专用15A整流桥GBU1510
GEE(四):计算两个变量(影像)之间的相关性并绘制散点图
LeetCode142. Circular linked list II [two pointers, two methods for judging links in the linked list and finding ring points]
LeetCode203. Remove linked list elements
CTF练习
Use JfreeChart to generate curves, histograms, pie charts, and distribution charts and display them to jsp-2
Basic knowledge of binary tree
消息队列与快递柜之间妙不可言的关系
Brush question 3
随机推荐
Transform XL translation
一次搞明白 Session、Cookie、Token,面试问题全稿定
线上面试,该如何更好的表现自己?这样做,提高50%通过率~
Circumvention Technology: Registry
Yarn cannot view the historical task log of yarn after enabling ACL user authentication. Solution
What is ADC sampling rate (Hz) and how to calculate it
[network] Introduction to C language
面试百问:如何测试App性能?
QT graphicsview graphical view usage summary with flow chart development case prototype
What is fake sharing after filling the previous hole?
Years of summary, some core suggestions for learning programming
关于海康ipc的几个参数
Line measurement - graphic reasoning -9- line problem class
Line test - graphic reasoning - 2 - black and white lattice class
2021-01-11
oc 可变參数传递
Line test graph reasoning graph group class
Debezium series: introducing support for the final operator
Sword finger offer 63 Maximum profit of stock
Unity dynamically merges mesh textures