Nothing Special   »   [go: up one dir, main page]

skip to main content
10.5555/3124362.3124373guideproceedingsArticle/Chapter ViewAbstractPublication PagesConference Proceedingsacm-pubtype
research-article
Free access

Design patterns for annotation-based APIs

Published: 16 November 2016 Publication History

Abstract

With the introduction of code annotations in popular languages like Java and C#, several frameworks and platforms adopted a metadata-based API (Application Programming Interface). By using this approach, instead of extending classes, implementing interfaces or invoking configuration methods, the API demands its users to add metadata through annotations in their classes. This approach can bring several benefits, such as decoupling between API and application classes and even a gain in productivity. However, this approach uses a different paradigm from traditional object-oriented programming, and existing patterns cannot be used to define such APIs. Thus, the present work aims to document patterns that describe recurrent solutions in the usage of code annotations for the creation of APIs. Based on such patterns, it is expected that API designers will have a broader range of tools to model the interaction between an application and a programming interface.

References

[1]
Chen, N. 2006. Convention over configuration.
[2]
Correia, D. A. A., Guerra, E. M., Silveira, F. F., and Fernandes, C. T. 2010. Quality improvement in annotated code. CLEI Electron. J. 13, 2.
[3]
Guerra, E. 2014. Componentes Reutilizáveis em Java com Reflexão e Anotações. Casa do Código.
[4]
Guerra, E., Alves, F., Kulesza, U., and Fernandes, C. 2013a. A reference architecture for organizing the internal structure of metadata-based frameworks. Journal of Systems and Software 86, 5, 1239 -- 1256.
[5]
Guerra, E., andJefferson Silva, M. C., and Fernandes, C. 2010. Idioms for code annotations in the java language. In Proceedings of the 17th Latin-American Conference on Pattern Languages of Programs, SugarLoafPLoPe, 1--14.
[6]
Guerra, E., Buarque, E., Fernandes, C., and Silveira, F. 2013b. A Flexible Model for Crosscutting Metadata-Based Frameworks. Springer Berlin Heidelberg, Berlin, Heidelberg, 391--407.
[7]
Guerra, E., de Souza, J., and Fernandes, C. 2013c. Pattern Language for the Internal Structure of Metadata-Based Frameworks. Springer Berlin Heidelberg, Berlin, Heidelberg, 55--110.
[8]
Guerra, E. and Fernandes, C. 2013. A qualitative and quantitative analysis on metadata-based frameworks usage. Computational Science and Its Applications âĂŞ ICCSA 2013 Lecture Notes in Computer Science 7972, 375--390.
[9]
Guerra, E., Fernandes, C., and Silveira, F. F. 2010. Architectural patterns for metadata-based frameworks usage. In Proceedings of the 17th Conference on Pattern Languages of Programs. PLOP '10. ACM, New York, NY, USA, 4:1--4:25.
[10]
Ho, C. and Harrop, R. 2012. Pro Spring 3 1st Ed. Apress, Berkely, CA, USA.
[11]
JSR175. 2003. Jsr 175: a metadata facility for the java programming language.
[12]
JSR220. 2006. Jsr 220: Enterprise javabeans 3.0.
[13]
JSR224. 2006. Jsr 224: Javatm api for xml-based web services (jax-ws) 2.0.
[14]
JSR250. 2006. Jsr 250: Common annotations for the javatm platform.
[15]
JSR299. 2009. Jsr 299: Contexts and dependency injection for the javatm ee platform.
[16]
JSR303. 2009. Jsr 303: Bean validation.
[17]
JSR311. 2009. Jsr 311: Jax-rs: The javatm api for restful web services.
[18]
Langr, J., Hunt, A., and Thomas, D. 2015. Pragmatic Unit Testing in Java 8 with JUnit 1st Ed. Pragmatic Bookshelf.
[19]
Microsoft. 2015. Asp.net web api.
[20]
Nuccitelli, R., Guerra, E., and Fernandes, C. Parsing xml documents in java using annotations. In XML: APLICAÃĞÃŢES E TECNOLOGIAS ASSOCIADAS (XATA 2010).

Cited By

View all
  • (2023)On the Applicability of Annotation-Based Source Code Modification in Kotlin (Work in Progress)Proceedings of the 20th ACM SIGPLAN International Conference on Managed Programming Languages and Runtimes10.1145/3617651.3622983(2-11)Online publication date: 19-Oct-2023
  • (2017)An annotation-based API for supporting runtime code annotation readingProceedings of the 2nd ACM SIGPLAN International Workshop on Meta-Programming Techniques and Reflection10.1145/3141517.3141856(6-14)Online publication date: 22-Oct-2017

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image Guide Proceedings
SugarLoafPLoP '16: Proceedings of the 11th Latin-American Conference on Pattern Languages of Programming
November 2016
205 pages

Sponsors

  • Hillside Group: Hillside Group

Publisher

The Hillside Group

United States

Publication History

Published: 16 November 2016

Author Tags

  1. APIs
  2. application programming interfaces
  3. code annotations
  4. frameworks
  5. metadata

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)252
  • Downloads (Last 6 weeks)13
Reflects downloads up to 26 Sep 2024

Other Metrics

Citations

Cited By

View all
  • (2023)On the Applicability of Annotation-Based Source Code Modification in Kotlin (Work in Progress)Proceedings of the 20th ACM SIGPLAN International Conference on Managed Programming Languages and Runtimes10.1145/3617651.3622983(2-11)Online publication date: 19-Oct-2023
  • (2017)An annotation-based API for supporting runtime code annotation readingProceedings of the 2nd ACM SIGPLAN International Workshop on Meta-Programming Techniques and Reflection10.1145/3141517.3141856(6-14)Online publication date: 22-Oct-2017

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media