UAX: Measuring the Usability of TypeScript APIs

Resumo


Application Programming Interfaces (APIs) have become an asset used everyday by developers looking for opportunities of code reuse. However, this ubiquity has led to numerous complexities, making the construction of good APIs challenging. Developers in fact often find APIs hard to learn and use. Therefore, usability has become a fundamental attribute for APIs in the last years, but it is often neglected by API designers. In reality, traditional user studies are frequently deemed expensive and difficult to interpret which stimulated the search for objective, and less expensive ways to measure API usability like metrics. The studies of metrics revealed good ways to measure API structurally, but the availability of publicly tools are either lacking or not being maintained. In this paper, we present UAX, a public tool that implements API usability metrics initially for TypeScript (a superset of JavaScript). We discuss its implementation and show its application to three reactive programming (RP) APIs with the help of a dashboard we also produced to help interpret the results. The evaluation showed that the RP APIs presented a high level of usability but with areas of improvements, like parameter consistency and API documentation. This demonstrates that the tool could support API designers to better plan the API construction and software engineering process, especially before the APIs get even released.
Palavras-chave: Stored Procedures, Microsserviços, Geração Automática de Código

Referências

Hussain Alkharusi. 2022. A descriptive analysis and interpretation of data from likert scales in educational and psychological research. Indian Journal of Psychology and Education 12, 2 (2022), 13–16.

Engineer Bainomugisha, Andoni Lombide Carreton, Tom van Cutsem, Stijn Mostinckx, and Wolfgang de Meuter. 2013. A survey on reactive programming. ACM Computing Surveys (CSUR) 45, 4 (2013), 1–34.

Alan F Blackwell and Thomas RG Green. 2000. A Cognitive Dimensions questionnaire optimised for users.. In 12th Workshop of the Psychology of Programming Interest Group (PPIG 2000). Edizioni Memoria, 137–154.

Chris Burns, Jennifer Ferreira, Theodore D Hellmann, and Frank Maurer. 2012. Usable results from the field of API usability: A systematic mapping and further analysis. In 2012 IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC). IEEE, 179–182.

Cleidson RB De Souza and David LM Bentolila. 2009. Automatic evaluation of API usability using complexity metrics and visualizations. In 2009 31st International Conference on Software Engineering-Companion Volume. IEEE, 299–302.

James Diprose, Bruce MacDonald, John Hosking, and Beryl Plimmer. 2017. Designing an API at an appropriate abstraction level for programming social robot applications. Journal of Visual Languages & Computing 39 (2017), 22–40.

Joscha Drechsler, Guido Salvaneschi, Ragnar Mogk, and Mira Mezini. 2014. Distributed REScala: An update algorithm for distributed reactive programming. ACM SIGPLAN Notices 49, 10 (2014), 361–376.

Michi Henning. 2009. API design matters. Commun. ACM 52, 5 (2009), 46–56.

Felienne Hermans. 2021. The Programmer’s Brain: What every programmer needs to know about cognition. Simon and Schuster.

Sebastian Kleinschmager, Romain Robbes, Andreas Stefik, Stefan Hanenberg, and Eric Tanter. 2012. Do static type systems improve the maintainability of software systems? An empirical study. In 2012 20th IEEE International Conference on Program Comprehension (ICPC). IEEE, 153–162.

Luis López-Fernández, Boni García, Micael Gallego, and Francisco Gortázar. 2017. Designing and evaluating the usability of an API for real-time multimedia services in the Internet. Multimedia Tools and Applications 76, 12 (2017), 14247–14304.

Alessandro Margara and Guido Salvaneschi. 2014.We have a DREAM: Distributed reactive programming with consistency guarantees. In Proceedings of the 8th ACM International Conference on Distributed Event-Based Systems. ACM, 142–153.

Alessandro Margara and Guido Salvaneschi. 2018. On the semantics of distributed reactive programming: the cost of consistency. IEEE Transactions on Software Engineering 44, 7 (2018), 689–711.

Joao Paulo O Marum, J Adam Jones, and H Conrad Cunningham. 2019. Towards a reactive game engine. In 2019 SoutheastCon. IEEE, 1–8.

Leo A Meyerovich, Arjun Guha, Jacob Baskin, Gregory H Cooper, Michael Greenberg, Aleks Bromfield, and Shriram Krishnamurthi. 2009. Flapjax: a programming language for Ajax applications. In Proceedings of the 24th ACM SIGPLAN conference on Object oriented programming systems languages and applications. ACM, 1–20.

Ragnar Mogk. 2015. Reactive interfaces: Combining events and expressing signals. In Workshop on Reactive and Event-based Languages & Systems (REBLS). ACM.

Ragnar Mogk, Guido Salvaneschi, and Mira Mezini. 2018. Reactive programming experience with rescala. In Companion Proceedings of the 2nd International Conference on the Art, Science, and Engineering of Programming. ACM, 105–112.

Lauren Murphy, Mary Beth Kery, Oluwatosin Alliyu, Andrew Macvean, and Brad A Myers. 2018. API designers in the field: Design practices and challenges for creating usable APIs. In 2018 ieee symposium on visual languages and humancentric computing (vl/hcc). IEEE, 249–258.

Brad A Myers and Jeffrey Stylos. 2016. Improving API usability. Commun. ACM 59, 6 (2016), 62–69.

John K Ousterhout. 2018. A philosophy of software design. Vol. 98. Yaknyam Press Palo Alto, CA, USA.

Pujan Petersen, Stefan Hanenberg, and Romain Robbes. 2014. An empirical comparison of static and dynamic type systems on api usage in the presence of an ide: Java vs. groovy with eclipse. In Proceedings of the 22nd International Conference on Program Comprehension. ACM, 212–222.

Marco Piccioni, Carlo A Furia, and Bertrand Meyer. 2013. An empirical study of API usability. In 2013 ACM/IEEE International Symposium on Empirical Software Engineering and Measurement. IEEE, 5–14.

Benjamin C Pierce. 2002. Types and programming languages. MIT press.

Girish Maskeri Rama and Avinash Kak. 2015. Some structural measures of API usability. Software: Practice and Experience 45, 1 (2015), 75–110.

Irum Rauf, Elena Troubitsyna, and Ivan Porres. 2019. A systematic mapping study of API usability evaluation methods. Computer Science Review 33 (2019), 49–68.

Martin P Robillard. 2009. What makes APIs hard to learn? Answers from developers. IEEE software 26, 6 (2009), 27–34.

Guido Salvaneschi. 2016. What do we really know about data flow languages?. In Proceedings of the 7th International Workshop on Evaluation and Usability of Programming Languages and Tools. ACM, 30–31.

Guido Salvaneschi, Sven Amann, Sebastian Proksch, and Mira Mezini. 2014. An empirical study on program comprehension with reactive programming. In Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering. ACM, 564–575.

Guido Salvaneschi, Joscha Drechsler, and Mira Mezini. 2013. Towards distributed reactive programming. In Coordination Models and Languages: 15th International Conference, COORDINATION 2013, Held as Part of the 8th International Federated Conference on Distributed Computing Techniques, DisCoTec 2013, Florence, Italy, June 3-5, 2013. Proceedings 15. Springer, 226–235.

Guido Salvaneschi, Gerold Hintz, and Mira Mezini. 2014. REScala: Bridging between object-oriented and functional style in reactive applications. In Proceedings of the 13th international conference on Modularity. ACM, 25–36.

Guido Salvaneschi, Alessandro Margara, and Giordano Tamburrelli. 2015. Reactive programming: A walkthrough. In 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering, Vol. 2. IEEE, 953–954.

Guido Salvaneschi, Sebastian Proksch, Sven Amann, Sarah Nadi, and Mira Mezini. 2017. On the positive effect of reactive programming on software comprehension: An empirical study. IEEE Transactions on Software Engineering 43, 12 (2017), 1125–1143.

Thomas Scheller and Eva Kühn. 2015. Automated measurement of API usability: The API concepts framework. Information and Software Technology 61 (2015), 145–162.

Artur Sterz, Matthias Eichholz, Ragnar Mogk, Lars Baumgärtner, Pablo Graubner, Matthias Hollick, Mira Mezini, and Bernd Freisleben. 2021. ReactiFi: Reactive Programming of Wi-Fi Firmware on Mobile Devices. Art Sci. Eng. Program. 5, 2 (2021), 4.

Jeffrey Stylos and Brad Myers. 2007. Mapping the space of API design decisions. In IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC 2007). IEEE, 50–60.

Akhila Sri Manasa Venigalla and Sridhar Chimalakonda. 2021. On the comprehension of application programming interface usability in game engines. Software: Practice and Experience 51, 8 (2021), 1728–1744.

Chamila Wijayarathna, Nalin AG Arachchilage, and Jill Slay. 2017. A generic cognitive dimensions questionnaire to evaluate the usability of security apis. In International Conference on Human Aspects of Information Security, Privacy, and Trust. Springer, 160–173.

Tianyi Zhang, Björn Hartmann, Miryung Kim, and Elena L Glassman. 2020. Enabling data-driven api design with community usage data: A need-finding study. In Proceedings of the 2020 CHI Conference on Human Factors in Computing Systems. ACM, 1–13.

Carlos Zimmerle, Kiev Gama, Fernando Castor, and José Murilo Mota Filho. 2022. Mining the usage of reactive programming APIs: a study on GitHub and stack overflow. In Proceedings of the 19th International Conference on Mining Software Repositories. ACM, 203–214.
Publicado
30/09/2024
ZIMMERLE, Carlos; GAMA, Kiev. UAX: Measuring the Usability of TypeScript APIs. In: SIMPÓSIO BRASILEIRO DE ENGENHARIA DE SOFTWARE (SBES), 38. , 2024, Curitiba/PR. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2024 . p. 803-809. DOI: https://doi.org/10.5753/sbes.2024.3658.