Are RESTful APIs Well-Designed? Detection of their Linguistic (Anti)Patterns

  • Francis PalmaEmail author
  • Javier Gonzalez-Huerta
  • Naouel Moha
  • Yann-Gaël Guéhéneuc
  • Guy Tremblay
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9435)


Identifier lexicon has a direct impact on software understandability and reusability and, thus, on the quality of the final software product. Understandability and reusability are two important characteristics of software quality. REST (REpresentational State Transfer) style is becoming a de facto standard adopted by many software organisations. The use of proper lexicon in RESTful APIs might make them easier to understand and reuse by client developers, and thus, would ease their adoption. Linguistic antipatterns represent poor practices in the naming, documentation, and choice of identifiers in the APIs as opposed to linguistic patterns that represent best practices. We present the DOLAR approach (Detection Of Linguistic Antipatterns in REST), which applies syntactic and semantic analyses for the detection of linguistic (anti)patterns in RESTful APIs. We provide detailed definitions of ten (anti)patterns and define and apply their detection algorithms on 15 widely-used RESTful APIs, including Facebook, Twitter, and YouTube. The results show that DOLAR can indeed detect linguistic (anti)patterns with high accuracy and that they do occur in major RESTful APIs.


REST Patterns Antipatterns Detection Semantic analysis 



The authors thank Charlie Faucheux for initiating the study. This study is supported by NSERC (Natural Sciences and Engineering Research Council of Canada) and FRQNT, Canada research grants.


  1. 1.
    Abebe, S.L., Haiduc, S., Tonella, P., Marcus, A.: Lexicon bad smells in software. In: 2009 16th Working Conference on Reverse Engineering, pp. 95–99. IEEE (2009)Google Scholar
  2. 2.
    Arnaoudova, V., Di, M.: Linguistic antipatterns: what they are and how developers perceive them. Empirical Softw. Eng. (2015)Google Scholar
  3. 3.
    Arnaoudova, V., Eshkevari, L.M., Penta, M.D., Oliveto, R., Antoniol, G., Gueheneuc, Y.G.: REPENT: analyzing the nature of identifier renamings. IEEE Trans. Softw. Eng. 40(5), 502–532 (2014)CrossRefGoogle Scholar
  4. 4.
    Berners-Lee, T., Fielding, R.T., Masinter, L.: Uniform Resource Identifier (URI), Generic Syntax (2005)Google Scholar
  5. 5.
    Edwards, M.: Service Component Architecture (SCA). OASIS, USA, April 2011Google Scholar
  6. 6.
    Erl, T.: Service-Oriented Architecture: Concepts, Technology and Design. Pearson Education, Boston (2005)Google Scholar
  7. 7.
    Fielding, R.T.: Architectural Styles and the Design of Network-based Software Architectures. Ph.D. thesis, University of California, Irvine (2000)Google Scholar
  8. 8.
    Fredrich, T.: RESTful Service Best Practices: Recommendations for Creating Web Services, May 2012.
  9. 9.
    Goddard, C.: Semantic Analysis: A Practical Introduction. Oxford Textbooks in Linguistics, OUP Oxford (2011)Google Scholar
  10. 10.
    Hausenblas, M.: On entities in the web of data. In: Wilde, E., Pautasso, C. (eds.) REST from Research to Practice, pp. 425–440. Springer, New York (2011)CrossRefGoogle Scholar
  11. 11.
    Laitinen, K.: Estimating understandability of software documents. SIGSOFT Softw. Eng. Notes 21(4), 81–92 (1996)CrossRefGoogle Scholar
  12. 12.
    Lawrie, D., Morrell, C., Feild, H., Binkley, D.: Effective identifier names for comprehension and memory. Innovations Syst. Softw. Eng. 3(4), 303–318 (2007)CrossRefGoogle Scholar
  13. 13.
    Lu, M., Sun, X., Wang, S., Lo, D., Duan, Y.: Query expansion via wordnet for effective code search. In: 22nd IEEE International Conference on Software Analysis, Evolution, and Reengineering, Montreal, Canada, pp. 545–549 (2015)Google Scholar
  14. 14.
    Massé, M.: REST API Design Rulebook. O’Reilly, Sebastopol (2012)Google Scholar
  15. 15.
    Mateos, C., Rodriguez, J.M., Zunino, A.: A tool to improve code-first web services discoverability through text mining techniques. Softw. - Pract. Experience (2014)Google Scholar
  16. 16.
  17. 17.
    Moha, N., Palma, F., Nayrolles, M., Conseil, B.J., Guéhéneuc, Y.-G., Baudry, B., Jézéquel, J.-M.: Specification and detection of SOA antipatterns. In: Liu, C., Ludwig, H., Toumani, F., Yu, Q. (eds.) ICSOC 2012. LNCS, vol. 7636, pp. 1–16. Springer, Heidelberg (2012) CrossRefGoogle Scholar
  18. 18.
    Palma, F., Dubois, J., Moha, N., Guéhéneuc, Y.-G.: Detection of REST patterns and antipatterns: a heuristics-based approach. In: Franch, X., Ghose, A.K., Lewis, G.A., Bhiri, S. (eds.) ICSOC 2014. LNCS, vol. 8831, pp. 230–244. Springer, Heidelberg (2014) CrossRefGoogle Scholar
  19. 19.
    Parrish, A.: Social Network APIs: A Revised Lexical Analysis (2010)Google Scholar
  20. 20.
    Rahman, M.M., Chanchal, R.K.: TextRank based search term identification for software change tasks. In: 22nd IEEE International Conference on Software Analysis, Evolution, and Reengineering, Montreal, Canada, pp. 540–544 (2015)Google Scholar
  21. 21.
    Rodriguez, J.M., Crasso, M., Zunino, A., Campo, M.: Improving web service descriptions for effective service discovery. Sci. Comput. Program. 75(11), 1001–1021 (2010)CrossRefzbMATHGoogle Scholar
  22. 22.
    Seinturier, L., Merle, P., Rouvoy, R., Romero, D., Schiavoni, V., Stefani, J.B.: A component-based middleware platform for reconfigurable service-oriented architectures. Softw. Pract. Experience 42(5), 559–583 (2012)CrossRefGoogle Scholar
  23. 23.
    Tilkov, S.: REST Anti-Patterns, July 2008.

Copyright information

© Springer-Verlag Berlin Heidelberg 2015

Authors and Affiliations

  • Francis Palma
    • 1
    • 2
    Email author
  • Javier Gonzalez-Huerta
    • 1
  • Naouel Moha
    • 1
  • Yann-Gaël Guéhéneuc
    • 2
  • Guy Tremblay
    • 1
  1. 1.Département d’informatiqueUniversité du Québec à MontréalMontréalCanada
  2. 2.Ptidej Team, DGIGLÉcole Polytechnique de MontréalMontréalCanada

Personalised recommendations