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
  • 18,562
  • 24
  • 92
  • 124

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
  • 33,620
  • 41
  • 145
  • 274
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
  • 219,040
  • 71
  • 423
  • 503