What is the advantage of the event-delegation model over the earlier event inheritance model?There are two advantages of event-delegation model over event-inheritance model.
First – Event-delegation enables the handling of events by objects other than the ones which generate the events. It is a clean separation between design and usage of a component.
Second – It's performance is much better in applications in which many events are generated. This improvement of performance is due to the fact that the unhandled events need not be repeatedly processed, which is the case of event-inheritance model.
What is the advantage of the event-delegation model over the earlier event inheritance model?Event-delegation model allows a separation between a component's design and its use as it enables event handling to be handled by objects other than the ones that generate the events.
As event-delegation model does not have to repeatedly process unhandled events, it performs much better in applications where many events are generated. This is unlike the event inheritance model.