Towards a Catalog of Java Dependency Injection Anti-Patterns. Laigner, R., Kalinowski, M., Carvalho, L., Mendonca, D., & Garcia, A. In Proceedings of the 33rd Brazilian Symposium on Software Engineering, SBES'19, Salvador, Brazil, September 23-27, pages 104-113, 2019. SBES 2019 Third Best Paper Award!
Author version doi abstract bibtex 7 downloads [Context] Dependency Injection (DI) is a commonly applied mechanism to decouple classes from their dependencies in order to provide better modularization of software. In the context of Java, the availability of a DI specification and popular frameworks, such as Spring, facilitate DI usage in software projects. However, bad DI implementation practices can have negative consequences. Even though the literature suggests the existence of DI anti-patterns, there is no detailed catalog of such bad practices. Moreover, there is no evidence on their occurrence and perceived usefulness from the developer’s point of view. [Goal] Our goal is to review the reported DI anti-patterns in order to analyze their completeness and to propose and evaluate a novel catalog of DI anti-patterns in the context of Java. [Method] We propose an initial catalog containing twelve Java DI anti-patterns. We selected four open source software projects that adopt a DI framework and developed a tool to statically analyze the occurrence of the DI anti-patterns within their source code. Also, we conducted a survey through face to face interviews with three experienced developers that regularly apply DI. [Results] At least nine different DI anti-patterns appeared in each analyzed project. In addition, the feedback received from the developers confirmed their relevance and the importance of investing further effort towards a catalog. [Conclusion] The results indicate that the initial catalog contains Java DI anti-patterns that occur in practice and are useful. Sharing it with practitioners may help them to avoid such anti-patterns. Sharing it with the research community will enable further improving the catalog.
@inproceedings{LaignerKCMG19,
author = {Rodrigo Laigner and Marcos Kalinowski and Luiz Carvalho and Diogo Mendonca and Alessandro Garcia},
title = {Towards a Catalog of Java Dependency Injection Anti-Patterns},
abstract = {[Context] Dependency Injection (DI) is a commonly applied mechanism to decouple classes from their dependencies in order to provide better modularization of software. In the context of Java, the availability of a DI specification and popular frameworks, such as Spring, facilitate DI usage in software projects. However, bad DI implementation practices can have negative consequences. Even though the literature suggests the existence of DI anti-patterns, there is no detailed catalog of such bad practices. Moreover, there is no evidence on their occurrence and perceived usefulness from the developer’s point of view. [Goal] Our goal is to review the reported DI anti-patterns in order to analyze their completeness and to propose and evaluate a novel catalog of DI anti-patterns in the context of Java. [Method] We propose an initial catalog containing twelve Java DI anti-patterns. We selected four open source software projects that adopt a DI framework and developed a tool to statically analyze the occurrence of the DI anti-patterns within their source code. Also, we conducted a survey through face to face interviews with three experienced developers that regularly apply DI. [Results] At least nine different DI anti-patterns appeared in each analyzed project. In addition, the feedback received from the developers confirmed their relevance and the importance of investing further effort towards a catalog. [Conclusion] The results indicate that the initial catalog contains Java DI anti-patterns that occur in practice and are useful. Sharing it with practitioners may help them to avoid such anti-patterns. Sharing it with the research community will enable further improving the catalog.},
booktitle = {Proceedings of the 33rd Brazilian Symposium on Software Engineering, {SBES'19}, Salvador, Brazil, September 23-27},
year = {2019},
note = {<font color="red">SBES 2019 Third Best Paper Award!</font>},
pages = {104-113},
urlAuthor_version = {http://www.inf.puc-rio.br/~kalinowski/publications/LaignerKCMG19.pdf},
doi = {10.1145/3350768.3350771},
}
Downloads: 7
{"_id":"N6FeRgQN5Sqc8isvD","bibbaseid":"laigner-kalinowski-carvalho-mendonca-garcia-towardsacatalogofjavadependencyinjectionantipatterns-2019","authorIDs":["2B3zZtfuH9AmxpWuo","2QsG9mfJnwX6MTuoJ","2jrFxieEqzijPmHCy","38TTtmoy2stkAGXLQ","49dv4suCFf46nEFSX","4tYgEjmaCsf2biWKp","59a4710e2e4566ba6f00002f","5A6un3HSxZaPDiXPA","5BTmBrmMozf6YgG5J","5Xaa4eConBa76EZjB","5de815459b61e8de01000279","5dedbd05e47c43de01000074","5df2323f1e4fe9df010001ab","5df8262ddc1981de0100002b","5dfc0a4fb371afde010000ae","5e00d4f7ea72ecdf01000031","5e177d32cf35a4de010000b2","5e1c542be556c6de010000e5","5e24c7d1981ceddf01000056","5e273928557b88de0100018d","5e29e136888177df01000188","5e29e9bd8fb0e6de01000033","5e29ed5f8fb0e6de01000066","5e29edf08fb0e6de01000076","5e2f5ae926e5cadf0100022e","5e3731a0646a98de010001e3","5e3e9fdc8fc127df01000078","5e45b6010920e8de01000031","5e4dffdbcc196bde01000144","5e57fed4a38020de0100012b","5e5ea112c0a53dde010002a9","5e5f20398ca867de0100007b","5e5feba85241b5de01000152","5e612a1f97c182e901000006","5e62e7723ba99bdf0100011b","5e681423c1fce0de010003f7","5e6829e0dfcfe3de010002d5","5e68ed471a389bdf010002fe","5e692ffd6964dedf01000037","5e6a42a0e3f54ade0100021d","6QPwdbn4oBshmv7s4","6dqbLtPtqmDfPtn76","7NssSDosapMwtTvug","7qizdca9gsw4HKauB","7rCPkhvup9LNQxuFs","9qNKNW92qhDZCwqc9","9zsfZu5qMELTmAhjx","AKLEQwiRMbTHnbbxP","B3j35ujgEN7NnDuao","BC6rKyeyBW4rnvBoD","BEXQaGSxnsXwH6ywH","BWc4GQhzJPEzBWCii","BWrEB42G2rZBhMXWP","BinBu8YbCD9S3FLZQ","BoieZoFeBMJdL7szA","BrusKEynoc5dFeBdm","C3QHjz3o9QHY2KM5z","CDoE7ubzqSgQDw4No","D9yfAL4Cz9raPXGYt","DMAfbTM8MTudubAmg","E3kQ5FnruEw9rpydE","EQmGWRtm5iTqAJr79","EjYMP7BmZWnnCe2G9","FTnnFRpMBDeeiPH49","Fjz6zCPk6dhrQh7ak","GBDnirB2vxTn44Eh8","GfRgLSdsCnJcxHqk5","H3Kkeh8KdpXLBi5vv","H9jTFvgcfA2frDvhj","J68AKX8noZCCaTSTC","JX7K3iwdPuCFmXLSK","KY7XQ7o9dYKbPfNvZ","LAPXFimEzgfLvJ3x5","MJz4w36aDvv4om6vd","NXfXCuu5e8PLD9tjP","NcXBcwHjnnYsqtJwj","P3xQviDsAA5Nyepbh","Q5HhB8XwWxviNHds8","QNZis6ZZX7Yjbx8dE","Qc6N7XXPtrqPpoz4E","SX7EYSkFddyzaBm6X","SkkXxnqrTM9jrCnHo","TEfrhfD2aFrBZaPoC","TdDrDsjDeT5x75mSb","X52u8rd5YXy5LA7un","XJLfEnjtpExqCJZaW","XMNYKpR8WAFvirRqK","XihJbHkzXLgRtNyxn","XsXTSrDqyDoKDSmNq","YKGB8CFNvsniQNWp6","YqBvGBJjQxyDSh7S5","YyAJT6vXC6BKreqDz","Zrx3awt824zfj7sSq","auNZr9WLsGE5yM95y","b6qEZg9dGLsnQLsBr","bb2xasFJChrMKgfGJ","dFvjKbaZaDAq7ckZJ","dPKdaA8smJs9fD9aK","e3dB4oaTL7GMfFgxK","eNvtiALsMm2uYYycD","eyyzX9y5xtqzMnTRj","gz3th4fHvqAew9t4d","hXHpEcrrfJ2s2iYfG","hdQfGGPRY6SRzm5Ko","iMFD4aggCkDpRbjzY","iSDp642Wcpz8tx3Et","idw5XK3YYZ9zoiTRQ","jQSpXNQ9zGdK9MNg5","jnzKc2JyGfzCkYHhd","juFRAZ7Ght5WjDjmL","k3N5QRHDiN6riZiAM","kd57C3edL7i8Wd84N","mfAwYkjQak83CbSTc","nrZNNBXjpC2enCsS6","o8dowv3jmQXqEKvC2","oab566NG74uXsBmwv","pAEkuNSzoQMJv6HEA","pPPN4e9LKJdN8Mxxy","pRJmqmExQ3P4YnarG","pcdRpqFz4kQKG67b2","peFdo2JYEZeDcgz5y","pmHQ27YZJtYA8bWLb","qRaeFjmTD9bcnWRpS","qujKQpt7j7DMJJ7RH","rhwhwtMA472RbPiq4","sgMZQR6tjyrtQJMjs","th5Bb6GjMT6NDynxY","tkio9AppMC7RRAmn3","up5b9JPmGJAE7cKzM","wE7ePiMnAtpNHo5xB","wjubqSThzCzkZtY4R","wuZMB8CeGEzZRou5r","x98pJyoike8bxbRn6","xSybShZMHQMQ8yMSF","xerEPhmhSdZJXb6QX","yqEQy2HisnquBmuLK","yvRZvxhXXSADSSiod","z8Hfj7RHYQjKdxD2H","zGAYQbmvDTTNydwuA"],"author_short":["Laigner, R.","Kalinowski, M.","Carvalho, L.","Mendonca, D.","Garcia, A."],"bibdata":{"bibtype":"inproceedings","type":"inproceedings","author":[{"firstnames":["Rodrigo"],"propositions":[],"lastnames":["Laigner"],"suffixes":[]},{"firstnames":["Marcos"],"propositions":[],"lastnames":["Kalinowski"],"suffixes":[]},{"firstnames":["Luiz"],"propositions":[],"lastnames":["Carvalho"],"suffixes":[]},{"firstnames":["Diogo"],"propositions":[],"lastnames":["Mendonca"],"suffixes":[]},{"firstnames":["Alessandro"],"propositions":[],"lastnames":["Garcia"],"suffixes":[]}],"title":"Towards a Catalog of Java Dependency Injection Anti-Patterns","abstract":"[Context] Dependency Injection (DI) is a commonly applied mechanism to decouple classes from their dependencies in order to provide better modularization of software. In the context of Java, the availability of a DI specification and popular frameworks, such as Spring, facilitate DI usage in software projects. However, bad DI implementation practices can have negative consequences. Even though the literature suggests the existence of DI anti-patterns, there is no detailed catalog of such bad practices. Moreover, there is no evidence on their occurrence and perceived usefulness from the developer’s point of view. [Goal] Our goal is to review the reported DI anti-patterns in order to analyze their completeness and to propose and evaluate a novel catalog of DI anti-patterns in the context of Java. [Method] We propose an initial catalog containing twelve Java DI anti-patterns. We selected four open source software projects that adopt a DI framework and developed a tool to statically analyze the occurrence of the DI anti-patterns within their source code. Also, we conducted a survey through face to face interviews with three experienced developers that regularly apply DI. [Results] At least nine different DI anti-patterns appeared in each analyzed project. In addition, the feedback received from the developers confirmed their relevance and the importance of investing further effort towards a catalog. [Conclusion] The results indicate that the initial catalog contains Java DI anti-patterns that occur in practice and are useful. Sharing it with practitioners may help them to avoid such anti-patterns. Sharing it with the research community will enable further improving the catalog.","booktitle":"Proceedings of the 33rd Brazilian Symposium on Software Engineering, SBES'19, Salvador, Brazil, September 23-27","year":"2019","note":"<font color=\"red\">SBES 2019 Third Best Paper Award!</font>","pages":"104-113","urlauthor_version":"http://www.inf.puc-rio.br/~kalinowski/publications/LaignerKCMG19.pdf","doi":"10.1145/3350768.3350771","bibtex":"@inproceedings{LaignerKCMG19,\r\n author = {Rodrigo Laigner and Marcos Kalinowski and Luiz Carvalho and Diogo Mendonca and Alessandro Garcia},\r\n title = {Towards a Catalog of Java Dependency Injection Anti-Patterns},\r\n abstract = {[Context] Dependency Injection (DI) is a commonly applied mechanism to decouple classes from their dependencies in order to provide better modularization of software. In the context of Java, the availability of a DI specification and popular frameworks, such as Spring, facilitate DI usage in software projects. However, bad DI implementation practices can have negative consequences. Even though the literature suggests the existence of DI anti-patterns, there is no detailed catalog of such bad practices. Moreover, there is no evidence on their occurrence and perceived usefulness from the developer’s point of view. [Goal] Our goal is to review the reported DI anti-patterns in order to analyze their completeness and to propose and evaluate a novel catalog of DI anti-patterns in the context of Java. [Method] We propose an initial catalog containing twelve Java DI anti-patterns. We selected four open source software projects that adopt a DI framework and developed a tool to statically analyze the occurrence of the DI anti-patterns within their source code. Also, we conducted a survey through face to face interviews with three experienced developers that regularly apply DI. [Results] At least nine different DI anti-patterns appeared in each analyzed project. In addition, the feedback received from the developers confirmed their relevance and the importance of investing further effort towards a catalog. [Conclusion] The results indicate that the initial catalog contains Java DI anti-patterns that occur in practice and are useful. Sharing it with practitioners may help them to avoid such anti-patterns. Sharing it with the research community will enable further improving the catalog.},\r\n booktitle = {Proceedings of the 33rd Brazilian Symposium on Software Engineering, {SBES'19}, Salvador, Brazil, September 23-27},\r\n year = {2019},\r\n note = {<font color=\"red\">SBES 2019 Third Best Paper Award!</font>}, \r\n pages = {104-113},\r\n urlAuthor_version = {http://www.inf.puc-rio.br/~kalinowski/publications/LaignerKCMG19.pdf},\r\n doi = {10.1145/3350768.3350771},\r\n} \r\n\r\n","author_short":["Laigner, R.","Kalinowski, M.","Carvalho, L.","Mendonca, D.","Garcia, A."],"key":"LaignerKCMG19","id":"LaignerKCMG19","bibbaseid":"laigner-kalinowski-carvalho-mendonca-garcia-towardsacatalogofjavadependencyinjectionantipatterns-2019","role":"author","urls":{"Author version":"http://www.inf.puc-rio.br/~kalinowski/publications/LaignerKCMG19.pdf"},"metadata":{"authorlinks":{"kalinowski, m":"https://www-di.inf.puc-rio.br/~kalinowski/publications.html","laigner, r":"https://rnlaigner.github.io/publication.html"}},"downloads":7},"bibtype":"inproceedings","biburl":"https://bibbase.org/network/files/KuRSiZJF8A6EZiujE","creationDate":"2019-07-09T20:19:42.555Z","downloads":7,"keywords":[],"search_terms":["towards","catalog","java","dependency","injection","anti","patterns","laigner","kalinowski","carvalho","mendonca","garcia"],"title":"Towards a Catalog of Java Dependency Injection Anti-Patterns","year":2019,"dataSources":["JhEx5LqjNuowkDTYw","FPdHx2YNMWt6KHbaS","oL8GbjE74fizfjkxY","Wbj3iHa4hGsGjEGJE","q7rgFjFgwoTSGkm3G","aKfxcyv7C9p9ytdpG","9pAzChfPy53GguqQk","B8Jierr7smZsGa7Jb","tvqztEQv84agmtPEB","FGDKYBjH9upApdKoL","56kphca3KPjtFZJC6","JxJm4GfaRAd3NEw2w","iSfhee4nHcHz4F2WQ"]}