Classbox/J: controlling the scope of change in Java

  • Authors:
  • Alexandre Bergel;Stéphane Ducasse;Oscar Nierstrasz

  • Affiliations:
  • University of Bern -- Switzerland;LISTIC -- University of Savoie, France & University of Bern -- Switzerland;University of Bern -- Switzerland

  • Venue:
  • OOPSLA '05 Proceedings of the 20th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

Abstract

Unanticipated changes to complex software systems can introduce anomalies such as duplicated code, suboptimal inheritance relationships and a proliferation of run-time downcasts. Refactoring to eliminate these anomalies may not be an option, at least in certain stages of software evolution. Classboxes are modules that restrict the visibility of changes to selected clients only, thereby offering more freedom in the way unanticipated changes may be implemented, and thus reducing the need for convoluted design anomalies. In this paper we demonstrate how classboxes can be implemented in statically-typed languages like Java. We also present an extended case study of Swing, a Java GUI package built on top of AWT, and we document the ensuing anomalies that Swing introduces. We show how Classbox/J, a prototype implementation of classboxes for Java, is used to provide a cleaner implementation of Swing using local refinement rather than subclassing.