The use of a singleton is not the problem, but the symptom of a problem. SOLID means: Single Responsibility Principle - Open/Closed Principle - Liskov Substitution Principle - Interface Segregation Principle. The ninth rule of the Object Calisthenics is related to this principle. A rectangle is a plane figure with four right angles. It has a width, and a height. A square is a square.
2 Comments
Sort: