next up previous contents
Next: JRefactory (Java) Up: A Short Look on Previous: A Short Look on

Refactoring Browser (Smalltalk)

The Smalltalk community was the first one which used refactorings consistently during the development process and many of the contributors like RALPH JOHNSON, KENT BECK, DON ROBERTS, MARTIN FOWLER et.al. originated from there, the development of the Refactoring Browser was only a logical step within the development. Fortunately the Smalltalk programming environment provides ideal conditions for implementing such an tool, as is later cited in this section.

Because of my shortcomings - I do neither have access nor knowledge of the Smalltalk programming language - I am not able to provide firsthand information about the tool but rather cite the authors [TAPOS] first as well as an enthusiastic user [Wiki, RefactoringBrowser-Kent Beck,]:

Since refactoring occurs at all levels within the software development life cycle, the ability to perform refactorings automatically is crucial to software evolution.

The Smalltalk Refactoring Browser is a tool that carries out many refactorings automatically, and provides an environment for improving the structure of Smalltalk programs. It makes refactoring safe and simple, and so reduces the cost of making reusable software.

The goal of our research is to move refactoring into the mainstream of program development. The only way that this can occur is to present refactorings to developers in such a way that they cannot help but use them. To do this, the refactoring tool must fit the way that they work. This goal imposes the following design criteria on the Refactoring Browser:

Another of the key design criteria is that we assume that there is an intelligence directing the refactoring process. ...It has been our experience that systems that perform automatic code reorganization are of little utility since they typically are algorithmic and have no understanding of the problem domain.

...

Our approach is to provide a tool that will search for places in your program where code is duplicated, or unused, and point them out. This allows a human to make the final call whether or not the code should be consolidated and to provide a semantically meaningful name.

...

There are some features of the Smalltalk language and the development environment Visual Works that allow an easier application of refactorings:

...

It is intended by the authors of the tool to extend it to enable users to do their refactorings even quicker and without reluctance:

Refactoring is a common operation in the software life cycle and the Refactoring Browser provides automatic support for many of the common transformations that come up in Smalltalk development. The Refactoring Browser is a practical tool in that it can perform correct refactorings on nearly all Smalltalk programs. In fact, we regularly use the Refactoring Browser on itself. That is, we use the tool to refactor its own source code. Additionally, the Refactoring Browser has been used to help develop a wide range of frameworks from the HotDraw framework for graphical editors, to financial models being developed by Caterpillar, to prototypes and models for a major telecommunications company.

Now KENT BECK shares [Wiki, RefactoringBrowser-Kent Beck,] his experiences with the Refactoring Browser:

This is absolutely the greatest piece of programming software to come out since the original Smalltalk browser. It completely changes the way you think about programming. All those niggling little "well, I should change this name but..." thoughts go away, because you just change the name because there is always a single menu item to just change the name....

The best thing about Refactory is how safe it is. As long as you don't manually edit the source code, you are nearly guaranteed (modulo things like choosing the wrong class for a "move to component") that you won't change the semantics of the program. The more I use it, the more aggressive I am slamming logic around until it makes sense.

Changing names is the least of its tricks. Some others are:

Some other cool tricks:

With unlimited undo, you can bravely try experiments that might not pan out.


next up previous contents
Next: JRefactory (Java) Up: A Short Look on Previous: A Short Look on

Michael Hunger
Mit Okt 25 00:48:16 MEST 2000