A framework for command processing in Java/Swing programs based on the MVC pattern

  • Authors:
  • Andreas Naderlinger;Josef Templ

  • Affiliations:
  • University of Salzburg, Salzburg, Austria;University of Salzburg, Salzburg, Austria

  • Venue:
  • Proceedings of the 6th international symposium on Principles and practice of programming in Java
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

We present a framework for command processing in Java/Swing programs based on the model-view-controller (MVC) pattern. In addition to standard approaches our framework supports (1) centralized exception handling, (2) premature command termination, (3) pre- and postprocessing of commands, (4) undo/redo based on event objects and model listeners, and (5) generic undo/redo commands. The framework has been applied successfully in a number of graphical editors as part of a tool chain for real time programming. It proved to increase the quality of the software by eliminating local exception handlers and by confining the impact of undo/redo to a small add-on to the model part of the application.