Hi flexcoders,
I have an architecture related question that I wanted to get some input on. I'm familiar with the design pattern in which a Controller class registers with itself a set of Command objects and listens for events signalling that those commands should be executed, and this pattern is explained very well in the sample upcoming Flex book chapter that many of us have been looking at. My question is, what's the advantage of using the event framework with this pattern over just writing the Controller as a Singleton and then invoking methods on it directly (each of which can delegate to a Command?). It seems as though the advantage of using events is that the objects issuing commands don't need to know about the Controller, but instead of that they do need to know about the EventBroadcaster class -- wouldn't it just be easier to skip the EventBroadcaster and invoke methods on the Controller directly? I'm totally open to more levels of abstraction as long as they provide a real benefit, but I think I'm missing something on this one.
Thanks
- rdo

