arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2305.07346cs.SE
收藏

RESTful API 设计规则是否影响 Web API 的可理解性?一项基于 API 描述的 Web 实验

Do RESTful API Design Rules Have an Impact on the Understandability of Web APIs? A Web-Based Experiment with API Descriptions

Justus Bogner, Sebastian Kotstein, Timo Pfaff

AI总结:

本文通过一项105人参与的受控Web实验,实证研究了12条RESTful API设计规则对可理解性的影响,发现大多数规则违反会显著降低理解表现和主观可理解性,为API设计规则的重要性提供了首个实证证据。

摘要:

背景:Web API 是在 Web 上公开应用程序功能的最常用方式之一,其可理解性对于高效使用所提供的资源非常重要。尽管存在许多 API 设计规则,但大多数规则的有效性缺乏实证证据。目标:因此,我们希望研究 1)RESTful API 设计规则对可理解性的影响,2)违反规则是否也被认为更难理解,以及 3)诸如 REST 相关经验等人口统计学属性是否对此有影响。方法:我们进行了一项受控的基于 Web 的实验,共有 105 名参与者,他们来自工业界和学术界,具有不同水平的经验。基于交叉设计和受试者间设计的混合方案,我们使用两种互补版本的 API 片段研究了 12 条设计规则:一个版本遵守“规则”,另一个版本“违反”该规则。参与者回答理解性问题并评价感知难度。结果:在 12 条规则中的 11 条上,我们发现“违反”版本在理解任务上的表现显著差于“规则”版本。关于主观评分,我们发现 12 条规则中有 9 条存在显著差异,这意味着大多数违规行为在主观上被评为更难理解。人口统计学因素在“违反”版本的理解表现中没有发挥作用。结论:我们的结果为遵循设计规则以提高 Web API 可理解性的重要性提供了首个实证证据,这对研究人员、从业者和教育工作者都很重要。

英文摘要:

Context: Web APIs are one of the most used ways to expose application functionality on the Web, and their understandability is important for efficiently using the provided resources. While many API design rules exist, empirical evidence for the effectiveness of most rules is lacking. Objective: We therefore wanted to study 1) the impact of RESTful API design rules on understandability, 2) if rule violations are also perceived as more difficult to understand, and 3) if demographic attributes like REST-related experience have an influence on this. Method: We conducted a controlled Web-based experiment with 105 participants, from both industry and academia and with different levels of experience. Based on a hybrid between a crossover and a between-subjects design, we studied 12 design rules using API snippets in two complementary versions: one that adhered to a "rule" and one that was a "violation" of this rule. Participants answered comprehension questions and rated the perceived difficulty. Results: For 11 of the 12 rules, we found that "violation" performed significantly worse than "rule" for the comprehension tasks. Regarding the subjective ratings, we found significant differences for 9 of the 12 rules, meaning that most violations were subjectively rated as more difficult to understand. Demographics played no role in the comprehension performance for "violation". Conclusions: Our results provide first empirical evidence for the importance of following design rules to improve the understandability of Web APIs, which is important for researchers, practitioners, and educators.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑