TY - GEN
T1 - Are the methods in your Data Access Objects (DAOs) in the right place? A preliminary study
AU - Aniche, Maurício F.
AU - Oliva, Gustavo A.
AU - Gerosa, Marco A.
N1 - Publisher Copyright:
© 2014 IEEE.
PY - 2014/12/3
Y1 - 2014/12/3
N2 - Isolating code that deals with system infrastructure from code that deals with domain rules is a good practice when developing applications. Code that deals with the database, for example, is often isolated in classes following a Data Access Object (DAO) pattern. Developers often create a DAO for each domain entity in the system. However, as some pieces of code deal with more than one entity/table, developers need to decide in which DAO they will place the code, and sometimes choose a less intuitive location. In this paper, we present a heuristic to identify methods that may have been written in an ambiguous place. To validate the idea, we tested it on three industrial projects from a Brazilian company. The heuristic selected, on average, 13% to 18% of the methods in DAOs. After evaluating such methods, we concluded that the heuristic was correct in 50% to 75% of cases. Therefore, we believe that the heuristic can indicate possible technical debt, where the developers may inspect and possibly refactor.
AB - Isolating code that deals with system infrastructure from code that deals with domain rules is a good practice when developing applications. Code that deals with the database, for example, is often isolated in classes following a Data Access Object (DAO) pattern. Developers often create a DAO for each domain entity in the system. However, as some pieces of code deal with more than one entity/table, developers need to decide in which DAO they will place the code, and sometimes choose a less intuitive location. In this paper, we present a heuristic to identify methods that may have been written in an ambiguous place. To validate the idea, we tested it on three industrial projects from a Brazilian company. The heuristic selected, on average, 13% to 18% of the methods in DAOs. After evaluating such methods, we concluded that the heuristic was correct in 50% to 75% of cases. Therefore, we believe that the heuristic can indicate possible technical debt, where the developers may inspect and possibly refactor.
KW - data access objects
KW - mining software repositories
UR - http://www.scopus.com/inward/record.url?scp=84920448440&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=84920448440&partnerID=8YFLogxK
U2 - 10.1109/MTD.2014.14
DO - 10.1109/MTD.2014.14
M3 - Conference contribution
AN - SCOPUS:84920448440
T3 - Proceedings - 2014 6th IEEE International Workshop on Managing Technical Debt, MTD 2014
SP - 47
EP - 50
BT - Proceedings - 2014 6th IEEE International Workshop on Managing Technical Debt, MTD 2014
PB - Institute of Electrical and Electronics Engineers Inc.
T2 - 6th IEEE International Workshop on Managing Technical Debt, MTD 2014
Y2 - 30 September 2014
ER -