Abstract
REST APIs are gaining a tremendous attraction in industry and a growing usage in mobile platforms. They are well suited for providing content to apps running on small devices, like smartphones and tablets. Several research works studied REST APIs development practices for mobile apps. However, little is known about how Android apps use/consume these APIs in practice. Consequently, we propose a multi-dimensional study on the state of the practice of REST APIs usage in Android apps. We follow three directions: analysing of Android apps, mining Stack Overflow posts on REST APIs usage in Android apps, and surveying Android developers about their usage of REST APIs in their mobile apps. We (1) build a catalog of Android REST mobile clients practices, (2) propose an automatic approach to detect these practices, (3) analyze 1595 Android apps downloaded from the Google Play store, (4) mine 12,478 Stack Overflow posts to study REST APIs usage in Android apps, and (5) conduct an online survey with 118 Android developers to understand their usage of these practices. We report that only two good practices are widely considered by Android developers when implementing their mobile apps. These practices are network connectivity awareness and JSON versus XML response parsing. We also report Android developers’ recommendations for the use of third-party HTTP libraries and their role in implementing the recommended practices.
Similar content being viewed by others
Notes
References
Abdellatif, M., Hecht, G., Mili, H., Elboussaidi, G., Moha, N., Shatnawi, A., Privat, J, Guéhéneuc, Y.G.: State of the practice in service identification for soa migration in industry. In: International Conference on Service-Oriented Computing, pp. 634–650. Springer (2018)
Arroqui, M., Mateos, C., Machado, C., Zunino, A.: Restful web services improve the efficiency of data transfer of a whole-farm simulator accessed by android smartphones. Comput. Electron. Agric. 87, 14–18 (2012)
Belkhir, A., Abdellatif, M., Tighilt, R., Moha, N., Guéhéneuc, Y.G., Beaudry, E.: An observational study on the state of rest api uses in android mobile applications. In: Proceedings of the 6th International Conference on Mobile Software Engineering and Systems, pp. 66–75. IEEE Press (2019)
Brabra, H., Mtibaa, A., Sliman, L., Gaaloul, W., Benatallah, B., Gargouri, F.: Detecting cloud (anti) patterns: Occi perspective. In: International Conference on Service-Oriented Computing, pp. 202–218. Springer (2016)
Brabra, H., Mtibaa, A., Sliman, L, Gaaloul, W., Benatallah, B., Gargouri, F.: Detecting cloud (anti)patterns: OCCI perspective. In: 14th International Conference on Service-Oriented Computing, volume 9936 of Lecture Notes in Computer Science, pp. 202–218. Springer (2016)
Cohen, J.: A coefficient of agreement for nominal scales. Educ. Psychol. Meas. 20(1), 37–46 (1960)
Landis, J.R., Koch, G.G.: The measurement of observer agreement for categorical data. Biometrics 4, 159–174 (1977)
Li, L., Bissyandé, T.F., Klein, J., Le, T.Y: An investigation into the use of common libraries in android apps. In: 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER), vol. 1, pp. 403–414. IEEE (2016)
Li, D., Halfond, W.G.J.: Optimizing energy of http requests in android applications. In: Proceedings of the 3rd International Workshop on Software Development Lifecycle for Mobile, pp. 25–28 (2015)
Li, D., Lyu, Y., Gui, J., Halfond, W.G.J.: Automated energy optimization of http requests for mobile applications. In: 2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE), pp. 249–260. IEEE (2016)
Nurseitov, N., Paulson, M., Reynolds, R., Izurieta, C.: Comparison of JSON and XML data interchange formats: a case study. In: 22nd International Conference on Computer Applications in Industry and Engineering, pp. 157–162 (2009)
Oumaziz, M.A., Belkhir, A., Vacher, T., Beaudry, E., Blanc, X., Falleri, J.R., Moha, N.: Empirical study on rest apis usage in android mobile applications. In: International Conference on Service-Oriented Computing, pp. 614–622. Springer (2017)
Palma, F., Dubois, J., Moha, N., Guéhéneuc, Y.G.: Detection of REST patterns and antipatterns: a heuristics-based approach. In: 12th International Conference on Service-Oriented Computing, volume 8831 of Lecture Notes in Computer Science, pp. 230–244. Springer (2014)
Palma, F., Gonzalez-Huerta, J., Moha, N., Guéhéneuc, Y.G., Tremblay, G.: Are restful apis well-designed? Detection of their linguistic (anti)patterns. In: 13th International Conference on Service-Oriented Computing, volume 9435 of Lecture Notes in Computer Science, pp. 171–187. Springer (2015)
Palma, F., Moha, N., Guéhéneuc, Y.G.: Unidosa: the unified specification and detection of service antipatterns. IEEE Trans. Softw. Eng. 45, 1024–1053 (2018)
Petrillo, F., Merle, P., Moha, N., Guéhéneuc, Y.: Are REST apis for cloud computing well-designed? An exploratory study. In: 14th International Conference on Service-Oriented Computing, volume 9936 of Lecture Notes in Computer Science, pp. 157–170. Springer (2016)
Rodrigues, C., Afonso, J., Tomé, P.: Mobile application webservice performance analysis: restful services with json and xml. In: International Conference on ENTERprise Information Systems, pp. 162–169. Springer (2011)
Rodríguez, C., Báez, M., Daniel, F., Casati, F., Trabucco, J.C., Canali, L., Percannella, G.: REST apis: a large-scale analysis of compliance with principles and best practices. In 16th International Conference Web Engineering, volume 9671 of Lecture Notes in Computer Science, pp. 21–39. Springer (2016)
Salza, P., Palomba, F., Di Nucci, D., De Lucia, A., Ferrucci, F.: Third-party libraries in mobile apps. Empir. Softw. Eng. 6, 1–37 (2019)
Singh, R., Mangat, N.S.: Elements of Survey Sampling, vol. 15. Springer, New York (2013)
Tilkov, S.: Rest anti-patterns. In: InfoQ Article (2008)
Vallée-Rai, R., Co, P., Gagnon, E., Hendren, L., Lam, P., Sundaresan, V.: Soot: a java bytecode optimization framework. In: CASCON First Decade High Impact Papers, pp. 214–224. IBM Corp. (2010)
Wang, H., Kessentini, M., Ouni, A.: Bi-level identification of web service defects. In: 14th International Conference on Service-Oriented Computing, volume 9936 of Lecture Notes in Computer Science, pp. 352–368. Springer (2016)
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Appendix: Overview of the survey questions
Appendix: Overview of the survey questions
See Table 2.
Rights and permissions
About this article
Cite this article
Abdellatif, M., Tighilt, R., Belkhir, A. et al. A multi-dimensional study on the state of the practice of REST APIs usage in Android apps. Autom Softw Eng 27, 187–228 (2020). https://doi.org/10.1007/s10515-020-00272-9
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10515-020-00272-9