kirancodes.me
To Proof Maintenance & Beyond!

Empirical Study of Programming to an Interface

Benoît Verhaeghe, Christopher P. Fuhrman, Latifa Guerrouj, Nicolas Anquetil, Stéphane Ducasse

Abstract

A popular recommendation to programmers in object-oriented software is to "program to an interface, not an implementation" (PTI). Expected benefits include increased simplicity from abstraction, decreased dependency on implementations, and higher flexibility. Yet, interfaces must be immutable, excessive class hierarchies can be a form of complexity, and "speculative generality" is a known code smell. To advance the empirical knowledge of PTI, we conducted an empirical investigation that involves 126 Java projects on GitHub, aiming to measuring the decreased dependency benefits (in terms of cochange).

BibTeX
@inproceedings{Verhaeghe-al:ASE19,
  author    = {Beno{\^{\i}}t Verhaeghe and
               Christopher P. Fuhrman and
               Latifa Guerrouj and
               Nicolas Anquetil and
               St{\'{e}}phane Ducasse},
  title     = {Empirical Study of Programming to an Interface},
  booktitle = {ASE},
  pages     = {847--850},
  publisher = {{IEEE}},
  year      = {2019},
}

Related papers