背景: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.
LRASGen: LLM-based RESTful API Specification Generation
Macau University of Science and Technology(澳门科技大学);Macau University of Science and Technology Zhuhai MUST Science and Technology Research Institute(澳门科技大学珠海慕思科学技术研究院);Beihang University(北京航空航天大学);University of Nottingham Ningbo China(宁波诺丁汉大学);China University of Mining and Technology(中国矿业大学)
MASTOR: A Multi-Agent Approach to Semantic Test Oracle Generation for RESTful APIs
Macau University of Science and Technology(澳门科技大学);Macau University of Science and Technology Zhuhai MUST Science and Technology Research Institute(澳门科技大学珠海MUST科学技术研究院);Beihang University(北京航空航天大学);China University of Mining and Technology(中国矿业大学)
MINES: Explainable Anomaly Detection through Web API Invariant Inference
National University of Singapore(国立新加坡大学);Shanghai Jiao Tong University(上海交通大学);Singapore Management University(新加坡管理学院);GovTech Singapore(新加坡政府科技局);Chongqing University(重庆大学)