Are the methods in your Data Access Objects (DAOs) in the right place? A preliminary study

Maurício F. Aniche, Gustavo A. Oliva, Marco A. Gerosa

Research output: Chapter in Book/Report/Conference proceedingConference contribution

2 Scopus citations

Abstract

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.

Original languageEnglish (US)
Title of host publicationProceedings - 2014 6th IEEE International Workshop on Managing Technical Debt, MTD 2014
PublisherInstitute of Electrical and Electronics Engineers Inc.
Pages47-50
Number of pages4
ISBN (Electronic)9781479967919
DOIs
StatePublished - Dec 3 2014
Externally publishedYes
Event6th IEEE International Workshop on Managing Technical Debt, MTD 2014 - Victoria, Canada
Duration: Sep 30 2014 → …

Publication series

NameProceedings - 2014 6th IEEE International Workshop on Managing Technical Debt, MTD 2014

Conference

Conference6th IEEE International Workshop on Managing Technical Debt, MTD 2014
Country/TerritoryCanada
CityVictoria
Period9/30/14 → …

Keywords

  • data access objects
  • mining software repositories

ASJC Scopus subject areas

  • Management Science and Operations Research
  • Control and Systems Engineering

Fingerprint

Dive into the research topics of 'Are the methods in your Data Access Objects (DAOs) in the right place? A preliminary study'. Together they form a unique fingerprint.

Cite this