4

Possible Duplicate:
Why choose a static class over a singleton implementation?

Static methods vs singletons.
Could it be determined choice here?
What are conditions in which one of these approaches is definetely more suitable then other?

Community
  • 1
  • 1
Mike
  • 20,010
  • 25
  • 97
  • 140

2 Answers2

3

Static methods follow the "low coupling and high coherence"-rule more than singletons do. (As long as their implementations don't rely on static member variables.)

StackedCrooked
  • 34,653
  • 44
  • 154
  • 278
2

If the static methods solve the same problem as the singleton, then why complicate and write a singleton?

Otherwise, why choose something that solves the wrong problem?

R. Martinho Fernandes
  • 228,013
  • 71
  • 433
  • 510