Immutability Of Interfaces
Erich Gamma: Since changing interfaces breaks clients you should consider them as immutable once you've published them. As a consequence when adding a new method to an interface you have to do so in a separate interface.
I hope the W3C people are listening. I have shouted about their adding methods to published interfaces 256 days ago, but you guys shouted me down.
Anybody want to argue the same point with Erich Gamma?
Re: Immutability Of Interfaces
On a related note, try to keep the public interface minimal. Fewer methods means there are fewer things you might have to change later. I also appreciate the article's discussion of Java "interface" versus "OO interface". Using something like Spring framework lets you focus on strictly the Java interface. If you construct objects directly, then the constructors also become part of the "interface" so to speak, meaning that they too cannot be changed without breaking clients.