|
|
Wednesday, October 30, 2002
|
|
Micro-Interfaces. I have found it really useful to extract a single method on the bloated object I'm trying to break up into an interface, and substituting a reference to the interface in the calling code wherever possible, repeating for each method, initially by defining one interface per method, and occasionally consolidating the interfaces where I find that several of them are passed around together. It does mean that for really blob-like objects, at about the halfway stage I find myself with humourous constructors like:- MyThing thing = new MyThing(this, this, this, this, this); Where 'this' is some bloated object that now implements 5 distinct interfaces, and the target class has been refactored to work through the interfaces. Its so obviously wrong that sheer embarrassment forces you to keep refactoring until its all clean. Writing tests gets really easy too. Its easy to make the TestCase implement an interface and pass itself to the object under test (self-shunt pattern) when the interface only declares one method! [Pushing the envelope]
10:17:54 PM
|
|
Borland buying Togethersoft. Acquisition adds collaboration and modeling to Borland's toolbox [InfoWorld: Top News]
It looks like there will be one less Java IDE. I'm sure Borland will end up pulling the nice parts of Control Center and sticking them into JBuilder.
10:14:37 PM
|
|
|
|
© Copyright
2002
SPD
.
Last update:
11/1/2002; 6:57:29 PM
. |
|
|
|