Utrecht University, CS. Dept.
Utrecht, The Netherlands
Email: florijn@cs.ruu.nl
Over the past few years, design patterns have become a hot topic in the object-oriented community. A (design) pattern describes a general solution for a recurring design problem. The solution is mostly described in terms of an abstract design structure expressed in design elements such as classes, methods and relationships (inheritance, associations).
The goal of our research is to explore how tools can make the use of patterns in OO software development easier. Our focus is not on the selection of suitable patterns for particular problems but on using patterns in the creation, reorganization and evolution of a design/program. Basically, we want to introduce patterns as first-class citizens in an integrated OO development environment.
Over the past year or so we have developed a first prototype of such an interactive environment. It provides assistance for:
- generating program elements (e.g. classes, hierarchies) for a new instance of a pattern that is taken from an extensible collection of "template" patterns
- integrating pattern occurrences with the existing program by binding program elements to a role in a pattern (e.g. indicating that and existing class plays a particular role in a pattern instance)
- checking whether (modified) occurrences of patterns still meet the invariants governing the patterns and repairing the program in case of problems.
Through the incorporation of an existing refactoring package, the environment supports program reorganization operations and can also be used for "reverse engineering", i.e. documenting occurrences of patterns in existing programs and modifying the program to better reflect the pattern's structure. The environment is implemented in Smalltalk and has been applied to identify pattern occurrences in several non-trivial (Smalltalk) applications and to reorganize these subsequently.
In this talk we will discuss the motivations for our work and the key design decisions and assumptions that were made. We will present an overview of the tool and discuss its architecture and functionality; in particular we will discuss the representation and validation of patterns and design structures. Finally, we will discuss our experiences until now and give an overview of some work in progress and future plans.