Help me!Help you!!!
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Lasse Koskela:
I would say such a mediator could still have value even if it's not reusable in other contexts. The purpose of a mediator is to avoid the screens themselves becoming coupled to each other and that goal is achieved regardless of how reusable (or unreusable) the mediator implementation is.
Help me!Help you!!!
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Originally posted by Lasse Koskela:
The benefit of the added indirection is that your components become decoupled from each other in the sense that when you need to change one component, you probably don't have to change a dozen others -- which could easily be the case if all those dozen other components referenced the changing component directly.
In some cases, it's ok to couple them together. It certainly is "easier" to go the route of strong coupling at first. However, when doing that you should be aware of the risk you're accumulating.
Help me!Help you!!!
Originally posted by william kane:
What I am not able to understand is 'How is using a mediator pattern more beneficial when compared to a class, for a say an InternalFrame, with private methods similar to methods in the mediator interface?'
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by william kane:
Thanks Lasse,
I get what you are saying.But earnestly i am not getting convinced the benifit of this decoupling and indirection that seems to be motive of all the design patterns....
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |