Skip to main content

A multi-dimensional study on the state of the practice of REST APIs usage in Android apps

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.

This is a preview of subscription content, access via your institution.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18
Fig. 19
Fig. 20
Fig. 21
Fig. 22
Fig. 23
Fig. 24
Fig. 25
Fig. 26
Fig. 27
Fig. 28
Fig. 29
Fig. 30
Fig. 31
Fig. 32
Fig. 33
Fig. 34
Fig. 35
Fig. 36
Fig. 37
Fig. 38
Fig. 39

Notes

  1. https://www.statista.com/statistics/330695/number-of-smartphone-users-worldwide/.

  2. https://www.statista.com/statistics/276623/number-of-apps-available-in-leading-app-stores/.

  3. http://git.sofa.uqam.ca/mabdellatif/PIRAC/tree/master.

  4. https://android-arsenal.com/.

  5. https://mvnrepository.com/open-source/http-clients.

  6. ,https://github.com/rtighilt/PIRAC-Android-Dataset/blob/master/REST-Client-Validation-apps.csv.

  7. http://www.ptidej.net/downloads/replications/ause20/.

  8. https://androzoo.uni.lu/.

  9. https://github.com/rtighilt/PIRAC-Android-Dataset/blob/master/pirac-analysed-dataset.csv.

  10. http://www.ptidej.net/downloads/replications/ause20/.

  11. https://bit.ly/2ypkEl9.

  12. https://forms.gle/gQhBeFdNQXERf5wc8.

  13. http://www.ptidej.net/downloads/replications/ause20/.

  14. https://developer.android.com/topic/performance/power/network/action-any-traffic.html.

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)

    Article  Google Scholar 

  • 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)

    Article  Google Scholar 

  • Landis, J.R., Koch, G.G.: The measurement of observer agreement for categorical data. Biometrics 4, 159–174 (1977)

    Article  Google Scholar 

  • 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)

    Article  Google Scholar 

  • 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)

    Google Scholar 

  • Singh, R., Mangat, N.S.: Elements of Survey Sampling, vol. 15. Springer, New York (2013)

    MATH  Google Scholar 

  • 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)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Manel Abdellatif.

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.

Table 2 Overview of the survey questions

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

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

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10515-020-00272-9

Keywords

  • REST API
  • Android
  • Practices
  • Third-party HTTP libraries