Another guy from our team provided me with a library as banners for his web framework. Let me call this framework my friend’s frame.
It has a specific class that I need. Half of the properties exposed by this class are what I really need for my own application. The other half is not needed. To get the properties of this class, you need to do some string manipulation. Since I will develop my own structure on top of this class, I want to disable dependency as much as possible. Perhaps in the future another friend of mine will develop a better structure.
So what I did, I created a facade class for this class. My own structure accesses properties through my facade class. If the "My Friend Framework" has changed, I just need to change one facade class, and the rest will remain the same. In addition, string manipulation is performed inside the facade class. In addition, the facade class provides only the necessary properties. Thus, my own structure simply refers to properties as normal getter / setter.
However, I had an argument with this guy. He forces me to use his class directly, since he will never change the implementation of his class. Therefore, he tells me that writing a facade class really does not matter. But I do not agree.
Am I really wrong? I really believe that I'm right.
chris source share