So, I want to go for a more Singleton - less design in the future. However, there seem to be a lot of tasks in an application that can't be done in meaningful way without singletons.
I call them "application wide services", but they also fall into the same category as the cross cutting concerns, which I usually fix via AOP.
Lets take an example:
I want an application wide message queue that dispatches messages to components, every component can subscribe and publish there, it's a very nice multicast thing.
The message queue and dispatching system are usually a (rather short) singleton class, which is very easy to implement in, say, C#. You can even use double dispatching and utilize message type metadata and the like, it's all so easy to do, it's almost trivial.
However, having singletons is not really "object oriented design" (it introduces global variables) and it makes testing harder.
Do you have any ideas? I'm asking this question because I'm willing to learn more about this topic, a LOT more. :-)
Edit:
I thank you all for your answers so far. I guess I have asked the wrong question, maybe it should have been "are singletons really that bad?".
It's a bit confusing... people telling you "omg singletons bad smellz!!11" all over the place - and on the other hand, they seem to be the easiest and most straightforward solution to those application - scope problems.
This is one of my "sticking points" at the moment. Solving this riddle.