Goke Pelemo

21%
Flag icon
One of the prime features of objects is encapsulation—hiding internal details from the rest of the world. Encapsulation often comes with delegation. You ask a director whether she is free for a meeting; she delegates the message to her diary and gives you an answer. All well and good. There is no need to know whether the director uses a diary, an electronic gizmo, or a secretary to keep track of her appointments. c However, this can go too far. You look at a class’s interface and find half the methods are delegating to this other class. After a while, it is time to use Remove Middle Man (192) ...more
Refactoring: Improving the Design of Existing Code (Addison-Wesley Signature Series (Fowler))
Rate this book
Clear rating
Open Preview