[Arp] Central dispatcher
aral at ariaware.com
Wed Apr 20 04:31:05 PDT 2005
I just took a look your Dispatcher class -- it in some ways recreates
the ControllerTemplate (take a look at ControllerTemplate.as) to act as
a generic mega-controller of sorts. The major issue I would have with
this is that if all the forms use the Dispatcher, none of them would be
able to function without it. i.e., we are violating encapsulation in a
major way and making each form dependent on the Dispatcher and I cannot
see what we gain in the process. The dynamic addition of listeners at
runtime also creates a loose contract that is difficult to maintain.
All the best,
Christophe Herreman wrote:
> here is another class I use in the ARP framework.
> Forms register for events with the "central" Dispatcher and not with
> The Dispacther automatically forwards the event without any extra coding?
> I still don't know if this is the best approach (vs. Event bubbling?)
> but I think it's safer to not let your forms know about eachother. Any
> It goes in com.ariaware.arp.util
More information about the Arp