Saturday, March 05, 2005

A refactoring class

We have a problem area in our application - the workflow facade. It began as a transaction script (our workflow is beyond simple in terms of branching etc) and has evolved into an unholy procedural mess.

We've played with it once or twice trying to find the right refactoring steps to turn it into useful objects. A couple of days ago, trying again (for a timeboxed couple of hours), we stubled across a simple refactoring that turns this ugly spaghetti code into nice OO code. Best of all the refactoring is fairly simple 8-10 steps and will be repeated 20-30 times.

This will make an ideal platform for teaching people the more interesting, chained together, refactorings.


Post a Comment

<< Home