Lazy Class

Prev don't be afraid of buying books Next

When describing this smell, Fowler and Beck write, "A class that isn't doing enough to pay for itself should be eliminated" [F, 83]. It's not uncommon to encounter a Singleton [DP] that isn't paying for itself. In fact, the Singleton may be costing you something by making your design too dependent on what amounts to global data. Inline Singleton (114) explains a quick, humane procedure for eliminating a Singleton.


Refactoring to Patterns (The Addison-Wesley Signature Series)
Refactoring to Patterns
ISBN: 0321213351
EAN: 2147483647
Year: 2003
Pages: 103

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: