   Events, observers, singletons...
  I've noticed this topic come up a lot recently on here, but haven't seen this problem specifically - unless I completely missed something.  I'm worknig on a utility to make interactive music but I've run into a design issue.  I need to issue a command from one part of the interface which will tell another part of the interface what it should be doing next.  I've run into this problem before but I'm not sure I handled it right.  For instance, I recently had to write a modernized graph/charting library.  There was one main manager class that you would instantiate, and then set the type of chart, add data, enable real time zooming etc.  Essentially it was nothing more than a wrapper though for communicating with other classes and instantiating the right class (in the case of choosing which type of chart to display for example).  In order to easily access data from various places, I simply passed a reference to the graph manager to each class it instantiated.  This allowed for everybody to have a method to communicate with each other and get information when needed.  Another way I thought to handle this was through a singleton.  But I know that's nothing more than a quick workaround that mostly indicates bad design :/  I read a thread a couple days ago about using observers.  That seems to be good for messages needing to be relayed from one location, but my problem seems to be more of relaying messages from many locations to one place, or possibly many locations to many places (sounds messy...)I'm sure this problem is common, so what is the "right" way to do this?  Is this problem a sign that the design is flawed already?  Or is there some method that people use to accomodate this issue?  If I need to give any more information just let me know.  Thanks.Cheers-Scott   
  It sounds like you're currently used the Mediator Pattern. That Wikipedia article isn't so great, though, so you might just want to check out the section on it in Design Patterns which has a much more complete and useful entry on it. Design Patterns has a lot of discussion about the consequences of using the pattern, both good and bad.   