Feb 8th, 2011, 04:28 AM
Why should we use EventBus when using Cairngorm
We are creating an application using the cairngorm framework. I have studied about the EventBus and came to know that it is used to establish decoupling between event publisher and event listener by using the pub/sub pattern i.e. by using this, we can assure that event publisher and event handler both are completely unknown of each other. But, if we think about the event dispatching machanism used in cairngorm framework by using "CairngormEventDispatcher.getInstace().dispatchEve nt(new eventABC())" , we found that in this case also the event publisher does not know about the event handler and vice a versa and the relation between these two is established through front controller.
So, i want to know that is it useful to use EventBus instead of CairngormEventDispatcher or it is only burden. If it is useful, and we are using EventBus, then, why should we use front controller.
Is there any sample code or any example where EventBus has been used with in Cairngorm framework.