These demos demonstrate
micro-refactoring, the coding style we envisaged as the headline feature
of our Java tool domain/j. This OOPSLA 2004
extended abstract
(oh and
this one, which has an accompanying
poster) discusses the demo and product concept a bit
more. This OOPSLA 2005
Onward! paper explains how trying (and
conspicuously failing) to build domain/j ultimately led to what I'm currently working on,
interactive programming
languages, whatever they are.
A simple example of micro-refactoring using domain/j. We'll turn a static employeeAsString() method
into the toString() method on the Employee class, using a number of refactoring micro-steps.
A more complex example showing one of the most common editing scenarios: responsibility migration
between two existing methods.
Another common example of responsibility migration, where statements are moved between methods, instead of expressions.
The point of the micro-refactoring approach is that it decomposes familiar refactorings into small steps, allowing
macro-refactorings to be composed out of existing ones and bridging the gap between text editing and large-scale change. This example shows how
Extract method breaks down into Wrap in call to identity, Push argument into method and Inline variable.
Moving state and behaviour in and out of classes is an important part of
moving a procedural design to a more object-oriented design. This demo shows how common parameter sets can be promoted
to classes, and methods pulled into the resulting classes.