Decoupling

Interfaces - no need to know exactly who you're talking to

I wrote about the Spring Framework Mission Statement earlier. This article follows it by examining the second Spring mission statement bullet, which concerns the use of interfaces in Java: It’s best to program to interfaces, rather than classes. Spring reduces the complexity cost of using interfaces to zero. Everyone knows this is a Good Thing - but why is it good? The answer lies in achieving decoupling. Object oriented programming in Java draws on the precedent set by Smalltalk in which objects communicate by passing messages.