Internet of Things (IoT) is a growing technology that relies on connected 'things' that gather data from peer devices and send data to servers via APIs (Application Programming Interfaces). The design quality of those APIs has a direct impact on their understandability and reusability. This study focuses on the linguistic design quality of REST APIs for IoT applications and assesses their linguistic quality by performing the detection of linguistic patterns and antipatterns in REST APIs for IoT applications. Linguistic antipatterns are considered poor practices in the naming, documentation, and choice of identifiers. In contrast, linguistic patterns represent best practices to APIs design. The linguistic patterns and their corresponding antipatterns are hence contrasting pairs. We propose the SARAv2 (Semantic Analysis of REST APIs version two) approach to perform syntactic and semantic analyses of REST APIs for IoT applications. Based on the SARAv2 approach, we develop the REST-Ling tool and empirically validate the detection results of nine linguistic antipatterns. We analyse 19 REST APIs for IoT applications. Our detection results show that the linguistic antipatterns are prevalent and the REST-Ling tool can detect linguistic patterns and antipatterns in REST APIs for IoT applications with an average accuracy of over 80%. Moreover, the tool performs the detection of linguistic antipatterns on average in the order of seconds, i.e., 8.396 seconds. We found that APIs generally follow good linguistic practices, although the prevalence of poor practices exists.
翻译:互联网(IoT)是一个不断增长的技术,它依赖于从同侪设备收集数据并通过API(应用编程界面)将数据传送到服务器的连接“东西”的技术。这些API的设计质量直接影响到它们的可理解性和可重复性。我们建议SARAV2 (REST APIs第二版的数学分析) 进行语言模式和语言质量分析,通过对用于IoT应用的REST API进行语言模式和反流分析来评估其语言质量。语言语言反流器被认为在命名、记录和选择识别符号方面的做法很差。相比之下,语言模式是AIPI设计的最佳做法。语言模式及其对应的防流模式因此对它们的可理解性和可重复性产生了直接的影响。我们建议SARAV2 (REST API 语言分析第二版) 进行语言模式和语系语言性分析。基于SARAV2方法,我们开发了REST-LI 工具的反流化工具,并用实验性方法验证了9种语言上AST 的测序应用结果。我们用普通的ARLAD Arestal Arestal Arestal Arass Arass 。我们用19 的测算算了80 。