{"title":"检测Java注释注入的依赖中的模块化“气味”","authors":"S. Roubtsov, Alexander Serebrenik, M. Brand","doi":"10.1109/CSMR.2010.45","DOIUrl":null,"url":null,"abstract":"Dependency injection is a recent programming mechanism reducing dependencies among components by delegating them to an external entity, called a dependency injection framework. An increasingly popular approach to dependency injection implementation relies upon using Java annotations, a special form of syntactic metadata provided by the dependency injection frameworks. However, uncontrolled use of annotations may lead to potential violations of well-known modularity principles. In this paper we catalogue “bad smells”, i.e., modularity-violating annotations defined by the developer or originating from the popular dependency injection frameworks. For each violation we discuss potential implications and propose means of resolving it. By detecting modularity bad smells in Java annotations our approach closes the gap between the state-of-the-art programming practice and currently available analysis techniques.","PeriodicalId":307062,"journal":{"name":"2010 14th European Conference on Software Maintenance and Reengineering","volume":"39 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2010-03-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"8","resultStr":"{\"title\":\"Detecting Modularity \\\"Smells\\\" in Dependencies Injected with Java Annotations\",\"authors\":\"S. Roubtsov, Alexander Serebrenik, M. Brand\",\"doi\":\"10.1109/CSMR.2010.45\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Dependency injection is a recent programming mechanism reducing dependencies among components by delegating them to an external entity, called a dependency injection framework. An increasingly popular approach to dependency injection implementation relies upon using Java annotations, a special form of syntactic metadata provided by the dependency injection frameworks. However, uncontrolled use of annotations may lead to potential violations of well-known modularity principles. In this paper we catalogue “bad smells”, i.e., modularity-violating annotations defined by the developer or originating from the popular dependency injection frameworks. For each violation we discuss potential implications and propose means of resolving it. By detecting modularity bad smells in Java annotations our approach closes the gap between the state-of-the-art programming practice and currently available analysis techniques.\",\"PeriodicalId\":307062,\"journal\":{\"name\":\"2010 14th European Conference on Software Maintenance and Reengineering\",\"volume\":\"39 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2010-03-15\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"8\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2010 14th European Conference on Software Maintenance and Reengineering\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/CSMR.2010.45\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2010 14th European Conference on Software Maintenance and Reengineering","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/CSMR.2010.45","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Detecting Modularity "Smells" in Dependencies Injected with Java Annotations
Dependency injection is a recent programming mechanism reducing dependencies among components by delegating them to an external entity, called a dependency injection framework. An increasingly popular approach to dependency injection implementation relies upon using Java annotations, a special form of syntactic metadata provided by the dependency injection frameworks. However, uncontrolled use of annotations may lead to potential violations of well-known modularity principles. In this paper we catalogue “bad smells”, i.e., modularity-violating annotations defined by the developer or originating from the popular dependency injection frameworks. For each violation we discuss potential implications and propose means of resolving it. By detecting modularity bad smells in Java annotations our approach closes the gap between the state-of-the-art programming practice and currently available analysis techniques.