domain/j demos

These Flash movies illustrate micro-refactoring, a “semantic editing” style we envisaged as the headline feature of our Java tool domain/j. I presented this at OOPSLA 2005 with my colleague Russ Freeman. The accompanying poster discusses the demo and product concept. This follow-up Onward! paper explains the path from domain/j to my current research interests.

Introducing micro-refactoring

Push into method + Inline variable + Pull into argument type

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.

Moving code between existing methods

Push into method + Pull enclosing application into method

A more complex example showing one of the most common editing scenarios: responsibility migration between two existing methods.

Migrating statements between methods

Push into following method

Another common example of responsibility migration, where statements are moved between methods, instead of expressions.

A refactoring micro-kernel

Extract method =
Introduce Method + Push argument into method + Inline Variable

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.

Migrating state and behaviour into classes

Extract class + Pull method into argument type

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.

One comment