An annotation-based API for supporting runtime code annotation reading

Q4 Social Sciences
Phyllipe Lima, E. Guerra, Marco Nardes, Andrea Mocci, G. Bavota, Michele Lanza
{"title":"An annotation-based API for supporting runtime code annotation reading","authors":"Phyllipe Lima, E. Guerra, Marco Nardes, Andrea Mocci, G. Bavota, Michele Lanza","doi":"10.1145/3141517.3141856","DOIUrl":null,"url":null,"abstract":"Code annotations are the core of the main APIs and frameworks for enterprise development, and are widely used on several applications. However, despite these APIs and frameworks made advanced uses of annotations, the language API for annotation reading is far from their needs. In particular, annotation reading is still a relatively complex task, that can consume a lot of development time and that can couple the framework internal structure to its annotations. This paper proposes an annotation-based API to retrieve metadata from code annotations and populate an instance with meta-information ready to be used by the framework. The proposed API is based on best practices and approaches for metadata definition documented on patterns, and has been implemented by a framework named Esfinge Metadata. We evaluated the approach by refactoring an existing framework to use it through Esfinge Metadata. The original and the refactored versions are compared using several code assessment techniques, such as software metrics, and bad smells detection, followed by a qualitative analysis based on source code inspection. As a result, the case study revealed that the usage of the proposed API can reduce the coupling between the metadata reading code and the annotations.","PeriodicalId":38836,"journal":{"name":"Meta: Avaliacao","volume":"48 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2017-10-22","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Meta: Avaliacao","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3141517.3141856","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q4","JCRName":"Social Sciences","Score":null,"Total":0}
引用次数: 2

Abstract

Code annotations are the core of the main APIs and frameworks for enterprise development, and are widely used on several applications. However, despite these APIs and frameworks made advanced uses of annotations, the language API for annotation reading is far from their needs. In particular, annotation reading is still a relatively complex task, that can consume a lot of development time and that can couple the framework internal structure to its annotations. This paper proposes an annotation-based API to retrieve metadata from code annotations and populate an instance with meta-information ready to be used by the framework. The proposed API is based on best practices and approaches for metadata definition documented on patterns, and has been implemented by a framework named Esfinge Metadata. We evaluated the approach by refactoring an existing framework to use it through Esfinge Metadata. The original and the refactored versions are compared using several code assessment techniques, such as software metrics, and bad smells detection, followed by a qualitative analysis based on source code inspection. As a result, the case study revealed that the usage of the proposed API can reduce the coupling between the metadata reading code and the annotations.
一个基于注释的API,用于支持运行时代码注释读取
代码注释是企业开发的主要api和框架的核心,被广泛应用于各种应用程序。然而,尽管这些API和框架对注释进行了高级的使用,但是用于读取注释的语言API还远远不能满足它们的需求。特别是,注释读取仍然是一项相对复杂的任务,它会消耗大量的开发时间,并且会将框架内部结构与其注释耦合在一起。本文提出了一种基于注释的API,用于从代码注释中检索元数据,并用元信息填充实例以供框架使用。提议的API基于记录在模式上的元数据定义的最佳实践和方法,并已由名为esfinger metadata的框架实现。我们通过重构现有框架来评估这种方法,以便通过esfinger Metadata使用它。使用几种代码评估技术(如软件度量和不良气味检测)比较原始版本和重构版本,然后进行基于源代码检查的定性分析。因此,案例研究表明,使用提议的API可以减少元数据读取代码和注释之间的耦合。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
Meta: Avaliacao
Meta: Avaliacao Social Sciences-Education
CiteScore
0.40
自引率
0.00%
发文量
13
审稿时长
10 weeks
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信