Skip to content.

plope

Personal tools
You are here: Home » Members » chrism's Home » Adaptation for Busy People » Well....
 
 

Comment

Above in this comment thread: Adaptation for Busy People » » Architecture Astronauts? »

Well....

Posted by andrew at 2006-09-08 11:01 AM
In this case, any time I wanted to change the passed in behavior: SimpleChurner - I would have to change all the callers. What if I want the added features a DeluxChurner provides, because it churns more efficiently? The win (in my experience) is that, I do not have to change any existing code, but simply change the registration for the adapter and the callers get this change for free.

The example Chris provides is simple, in more complex systems I find this pattern dramitcally decreases the amount of code requiring change. To say, "In the Java world there is a saying: You can always count on an architect to provide another level of indirection (to not really solve not really a problem)." is an irrelevant association. The problem that this added indirection solves is that we do not have to change code. Callers do not need modifying, all that has to change is the registration (done in configuration in the case of Zope).